Binary Arithmetic

Decimal to Binary

Perform repeated division, making note of the remainder at each stage. Keep dividing until you are dividing one by two.

10 / 2 = 5 remainder 0
 5 / 2 = 2 remainder 1
 2 / 2 = 1 remainder 0
 1 / 2 = 0 remainder 1
======================
10ten = 1010two

The number in binary will be the result of stringing together all the remainders in reverse order.

Alternate Equivalent Method

"Guess" which powers of two are added together to form the number.

10ten = 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20ten = 1010two

Decimal to Hexadecimal

Convert to binary, then convert binary to hexadecimal.


CSE 378 Spring 2002 - Section 1
First Previous Page 2 Next Last