How to convert decimal number to binary?

0
Posted

How to convert decimal number to binary?

0

Divide the decimal number by 2 and note the remainder Divide the Quient repetedly by 2 and note the remainders till quient is 0 Write remainder side by side in reverse order to know the binary number For example 18 18 divide by 2 leaves quient 9 remainder 0 9 divide by 2 leaves quient 4 remainder 1 4 divide by 2 leaves quient 2 remainder 0 2 divide by 2 leaves quient 1 remainder 0 2 divide by 1 leaves quient 0 remainder 1 So binary of 18 is 10010 To convert binary number to decimal number, start from leftmost digit multiply by 2 add next digit again multiply by 2 and add next digit and so on, You will get the decimal number