Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.16 KB

File metadata and controls

23 lines (16 loc) · 1.16 KB

Number Bases

Be familiar with the concept of a number base, in particular:

  • decimal (base 10)
  • binary (base 2)
  • hexadecimal (base 16).

Binary is base 2 meaning that only a 0 or a 1 can be used to represent numbers.

Decimal is base 10, meaning the numbers 0-9 are used to represent numbers (this is the standard base).

Hexadecimal is base 16, since there are only 10 numbers the final 16 must be made up using letters. The set used to represent hexadecimal is as follows: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}

Converting

Convert between decimal, binary and hexadecimal number bases.

Start Base Final Base How to Example
Decimal Binary Remove the largest power of two possible and place a 1 in that column in the binary number.
Then remove the largest power of two and do the same, repeat until the number has been fully represented.
176 to binary
Step 1: 176 - 128 = 48, Binary: 1 0000000.
Step 2: 48 - 32 = 16, Binary: 1 0 1 00000
Step 3: 16 - 16 = 0, Binary: 1 0 1 1 0 0 0 0
176 = 10110000
Binary to Hex
Hex to Binary