Binary numbers and words Flashcards
How many numbers can an n bit binary number represent?
2^n
What does a “Carry out” indicate with unsigned arithmetic?
That there has been an overflow
When summing two signed negative numbers is there a carry out? Does an overflow occur?
Yes there is a carry out, but you ignore it, there is no overflow.
When summing two signed positive numbers which are both larger than 150 what happens? 8Bit
No carry out is produced however an over flow occurred.
How do we know if there has been an overflow for singed arithmetic?
if pos and pos makes neg, or if neg and neg makes a pos, then an overflow has occurred. A neg and pos cannot overflow by def.
What is the natural word size?
FALSE they are all different
For MIPS what is a word
32 bits
What do memory locations generally hold?
bytes of data, irrespective of words
Processor will have registers which store what size of data?
Words
How does big-endian storage work?
Big endian stores the bytes the most significant byte in the lowest address (almost conventional) BIG END OF NUMBER COMES FIRST IN MEMORY
How does little-endian storage work?
Low byte (LSB) of number is at the lowest address LITTLE END OF NUMBER COMES FIRST IN MEMORY
Describe moving a 8 bit signed byte into a 32 bit word?
Move the value into the LSB and PERFORM SIGN EXTENSION for the other 3 bytes
Describe moving a 8 bit unsigned byte into a 32 bit word?
Move the value into the LSB and PERFORM ZERO EXTENSION for the other 3 bytes