Conversion between decimal number and binary number

E Ma
Nov 11, 2020

--

What is decimal number

Decimal number simple means a number that base on the number 10.

Example: 123 = 100+20+3 = 1*10²+ 1*10¹ + 3*10⁰ = 123

What is a binary number

A number that made by 1s and 0s.

Example: 101 = 1*2² + 0*2¹ + 1*2⁰ = 5

How to convert decimal number to binary number

Divide the decimal number by 2, update the decimal number to quotient until 0 and keep tracking the reminder. The reversed reminder will be the answer.

Example: Given 5 convert to a binary number, the answer is 101.

How to convert binary number to decimal number

To convert a binary number to decimal, simply sum the binary digits together.

Example: Given 100 convert to decimal number, the answer is 4.

Game Time:

Thanks for reading!

--

--