๐Ÿ“— -> 10/2/24: Dealing with Bases and Bit Representations


Lecture Slides

๐ŸŽค Vocab

โ— Unit and Larger Context

Converting between bases:

Numbers are represented as powers of the base added together, and multiplied:

  • Base 10: = 235
  • Base 16: 235 = = 14 11 = E B
  • Base 2: 235 =

Dealing with signed ints:

Sign Magnitude vs 2โ€™s Complement

Bit PatternUnsigned NumberSign Magnitude2โ€™s Complement
0000+00
001111
010222
011333
1004-0-4
1015-1-3
1106-2-2
1117-3-1

You are assigning a bit to the sign, so you can only represent a power of 2 less values than the unsigned equivalent

Ranges of Values

If you have bits you can represent:

  • Unsigned: to
  • Sign Magnitude: to
  • 2โ€™s Complement: to

โœ’๏ธ -> Scratch Notes

  • Log as you go through entry

๐Ÿงช-> Example

  • List examples of where entry contents can fit in a larger context
  • Link all related words