- Calculations
o Runtime
o Clock time/ frequency
o Clock cycles
o CPU time = CPU clock cycles/ clock rate = CPI * instruction time * clock cycle time
o CPI = CPU clock cycles / instruction count
o ISA
- When overflow/ underflow
- Binary numbers
o Subtraction
o Addition
o Two-complement
Negative
If first bit is 1
Conversion: inverse all bits (0 ->1 and 1-> 0), calculate decimal value,
add 1 -> result is negative of decimal value (+1)
Conversion to 2s complement from negative decimal:
o Subtract one
o Find binary number
o Inverse all binaries
o First binary number becomes 1 (to indicate negative value)
o Signed/ unsigned
Signed negative values can be converted to binary as well and a 1 as most
significant bit means it’s negative
Unsigned only positive values possible
o Conversion to binary
Decimal to binary:
See decimal to hexadecimal technique, but then dividing by 2
instead of 16 (due to different base)
o Conversion to hexadecimal
Decimal to hexadecimal:
Divide by 16 and note the integer result and the rest until the
integer result is 0
Convert the rests to hexadecimals (up to 15 = F)
These make up the hexadecimal value, where the “first rest”
acquired is the least significant (so write down from bottom to top)
Hexadecimal to decimal:
Take each digit and multiply by 16^index (where the index is
counted from the right (least significant) to the left (most significant)
digit, starting by 0)
Add the results
o Conversion to decimals