Exercise
What is 150
in decimal (base 10) in binary (base 2)?
Solution
150 / 2 = 75 R0
75 / 2 = 37 R1
37 / 2 = 18 R1
18 / 2 = 9 R0
9 / 2 = 4 R1
4 / 2 = 2 R0
2 / 2 = 1 R0
1 / 2 = 0 R1
Read the remainders from bottom to top.
150
in decimal (base 10) is 10010110
in binary (base 2).