1/56
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
next
Execute the next line of code, pausing once it is completed. If the line contained a function call, run the whole function
display expression
Show the value of expression whenever the program pauses execution
finish
Complete the current function you are in and go back to where this function was called
up
Move up one level on the call stack
print expression
Show the value of expression once
watch expression
Cause the program to pause execution whenever the value of expression changes
bt
Show the current call stack
down
Move down level on the call stack
step
Execute the next line of code, pausing once it is completed. If the line contained a function call, pause at the beginning of the called function
continue
Resume execution of the program until it hits the next breakpoint or reaches the end of the program
run
Start/restart execution of the program
break location
Cause the debugger to pause the program when it reaches the specified location
Nibble
4 bits
Byte
8 bits
S unique states
log2(s) bits
Int
4 bytes
Short
2 bytes
Char
1 byte
Float
4 bytes
Double
8 bytes
Logical Right Shift
unsigned int, char, short
Arithmetic Right Shift
int, char, short
Little Endian
The least significant byte of a word is stored at the lowest part of an address(backwards)
Big Endian
The most significant byte of a word is stored at the lowest part of an address(forwards)
One big Chunk
Advantages: Quick to access, works good with caches since elements next to each other
Disadvantages: Must know size of arrays at compile times, must specify size of dimensions
Array of Arrays
Advantages: Can have ragged arrays,don’t need to know size of array ahead of time
Disadvantages: Requires more space to store pointers, can be slower to access, rows aren’t adjacent
Global variables
Stored in order of appearance so the first global will have the lowest address
Arguments
Stored in order of appearance so the first argument will have the lowest address
Locals
Stored in reverse order of appearance so the last local will have the lowest address
Compiler Guard
Many protections come from computer instead of hardware, compiler refuses access of private variables, nothing in hardware protects it.
Row Major
K= i * N + j
Column Major
K = j * M + i
Major components of computer
Hardware, Low level Software(operation system, system calls)
Issues with Hardware
Programs run on one CPU will not run on another
Issues with Software
System calls will be different for different operating systems.
CPU
Executions instructions of program
Memory
Store’s program’s instructions and data
I/O Devices
Allows computer to interact with outside world(hard drive, monitor, mouse,keyboard)
System Bus
Wires that connect components so they can communicate, nothing stored, include control, address, and data bus
RAM
Takes same amount of time to access element regardless of where it is, volatile, where programs are stored when running
ROM
Nonvoltaile, when powered off stuff stays, system bios stored here
Control Bus
Used to send control signals such as read and write
Address Bus
use to send address you want to read from or write to
Data Bus
IF control bus says read: data bus will contain value read from memory at value sent to address bus, IF control says write: data bus will contain the value you want to write to memory
ALU
performs operations( addition, subtraction, bitwise AND) ,etc, does not store anything but calculations
Data Registers
small fast memory inside of CPU used to store data and results of operations
PC(Program Counter)
Holds address of instruction currently being executed
Instruction Register(IR)
Holds instructions being executed
ESP
Stack pointer, points to top of program’s stack
MAR(memory address register)
register connecting CPU to Address bus
MDR(memory data register)
register connecting CPU to data bus
EFlags
Stores various bits of data about the state of the program)(ex: What mode are we on? was the last digit 0?)
CPU Cycle
Fetch, Decode, Execute, Write(FDEW)
CPU Time
number of instructions/ program * clock cycles/ instruction * time/ clock cycles
Wall Time
Amount of time it takes for your program to finish, usually greater than CPU time because of delays
Parallelism
multiple operations at the same time
-Message passing: Processes explicitly send messages to one another
-Shared memory: Processes share information implicitly through shared memory
Pipelining
Breaking sequence into multiple stages and doing each stage to different things, limit to time of slowest stage(ex. washing clothes, cpu cycle(4x))