Objective

The objective of this experiment is to help students understand the concepts behind converting numbers between decimal and binary number systems. By learning these conversion methods, students will gain insight into how data is represented in digital systems and computers.

Binary to Decimal Conversion

In binary, numbers are represented using only two digits: 0 and 1. To convert a binary number into a decimal number, follow these steps:

  1. Write down the binary number.
  2. Starting from the rightmost digit, multiply each binary digit by 2 raised to the power of its position index (starting from 0).
  3. Add the results together to get the decimal equivalent.

Example: Convert binary 1101 to decimal.

Adding these up: 8 + 4 + 0 + 1 = 13 (in decimal).

Decimal to Binary Conversion

To convert a decimal number into binary, follow these steps:

  1. Divide the decimal number by 2.
  2. Record the remainder (0 or 1).
  3. Divide the quotient by 2 again and repeat the process until the quotient becomes 0.
  4. Write down the remainders in reverse order to get the binary equivalent.

Example: Convert decimal 13 to binary.

Step Division Remainder
1 13 ÷ 2 = 6 1
2 6 ÷ 2 = 3 0
3 3 ÷ 2 = 1 1
4 1 ÷ 2 = 0 1

So, the binary equivalent of decimal 13 is 1101.