Number Systems in Computing
Number Systems in Computing
Page 1 of 3
1. Divide the decimal number by 2.
2. Record the remainder (0 or 1).
3. Update the quotient by dividing it by 2.
4. Repeat steps 1-3 with the new quotient until the quotient becomes 0.
5. Read the remainders in reverse order. The result is the binary equivalent.
Example: Convert Decimal 13 to Binary
Let's convert the decimal number 13 to binary.
1. 13 ÷ 2 = 6, remainder = 1
2. 6 ÷ 2 = 3, remainder = 0
3. 3 ÷ 2 = 1, remainder = 1
4. 1 ÷ 2 = 0, remainder = 1
Reading the remainders from bottom to top, 13 in decimal is 1101 in binary.
Practice Example: Convert Decimal 45 to Binary
1. 45 ÷ 2 = 22, remainder = 1
2. 22 ÷ 2 = 11, remainder = 0
3. 11 ÷ 2 = 5, remainder = 1
4. 5 ÷ 2 = 2, remainder = 1
5. 2 ÷ 2 = 1, remainder = 0
6. 1 ÷ 2 = 0, remainder = 1
Reading the remainders from bottom to top, 45 in decimal is 101101 in binary.
Page 2 of 3
2. Assign powers of 2 to each bit, starting from the rightmost bit (which is 20) and moving
left.
3. Multiply each bit by its corresponding power of 2.
4. Add up the results to get the decimal value.
Example: Convert Binary 1101 to Decimal
Let's convert the binary number 1101 to decimal.
1. Write down the binary number with its positional values:
o 1×23=8
o 1×22=4
o 0×21=0
o 1×20=1
2. Add up the results:
o 8+4+0+1=13
So, 1101 in binary is 13 in decimal.
Practice Example: Convert Binary 101101 to Decimal
1. Write down the binary number with its positional values:
o 1×25=32
o 0×24=0
o 1×23=8
o 1×22=4
o 0×21=0
o 1×20=1
2. Add up the results:
o 32+0+8+4+0+1=45
So, 101101 in binary is 45 in decimal.
Page 3 of 3