19 August 2021

Last Time We learned about denominational numbering systems. We learned that a base numbering system is a denominational numbering system where the denomination are powers of the base.

We learned about the bigendian and littlending methods for dong base conversion.

Let's practice a bit together.

368    0
 92    0
 23    3
  5    1
  1    1
  0    0

  11300    base 4

  1 01 11 00 00

  101 110 000
   5   6   0

   5    6    0
   64   8    0
   ============
   320  48      →  368    

   368 = 0o560

   three bases:  2, 8, 16


   hexadecimal (16)

   {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}


   2**4 = 16. Each hex digit is 4 bits.

   bit (short for binary digit)
   byte = 8 bits
   nibble = 4 bits (one hex digit)


   0x3A7   0x means "this is a hex number"

    3     A     7
   0011  1010  0111

   0b1110100111


   0b1010111010011  turn this into ocatal and hex

octal   1 010 111 010 011  
        1  2   7   2   3    → 0o12723

hex:   1 0101 1101 0011  
       1   5   D    3       → 0x15D3

A Powerful Observation

Pod Assignment Complete the table in convert.txt.