Last modified on February 7th, 2024

chapter outline

 

Binary Number System

The word binary comes from ‘Bi’ means 2. Thus, a binary number system consists of 2 numbers, 0 and 1. It starts with 0 and ends in 1 and, therefore, has a base 2. The base-2 system in the positional notation is represented as (11101)2.

Binary Number System

It is widely used in making the latest computers and computer-based devices in their electronic circuits using logic gates. Each digit in the machine is referred to as a bit.

The numbers 0 to 20 in decimal are written in binary as follows:

DecimalBinary
00
11
210
311
4100
5101
6110
7111
81000
91001
101010
111011
121100
131101
141110
151111
1610000
1710001
1810010
1910011
2010100

Binary to Decimal Conversion

The binary number is converted to the decimal number by expressing each digit as the product of each number (1 or 2) to the power of 2 based on its place value.

If a binary number has n digits an-1….a3a2a1a0, its corresponding decimal number is obtained as:

(a0×20) + (a1×21) + (a2×22) +….

Let us convert the binary number 11101 to its corresponding decimal number.

The binary number 11101 is expressed as:

(11101)2 = (1 × 24) + (1 × 23) + (1 × 22) + (0 × 21) + (1 × 20)

= (29)10

Decimal to Binary Conversion

A decimal number is converted to its corresponding binary number by dividing the number by 2 until we get 1 as the quotient. The quotients are written from down to up.

Let us convert the decimal number 20 to its corresponding binary number.

Dividing the number by 2 in each step, we get:

DividendQuotientRemainder
20 ÷ 2100
10 ÷ 250
5 ÷ 221
2 ÷ 210
1 ÷ 201

Thus, the decimal number (20)10 is expressed as (10100)2

Operations on Binary Numbers

Like decimal numbers, binary numbers are used to perform mathematical operations: addition, subtraction, multiplication, and division.

Binary Addition

Binary numbers are added digit by digit to obtain the result of addition.

We will use the following 4 rules for addition:

  • 0 + 0 = 0
  • 1 + 0 = 1
  • 0 + 1 = 1
  • 1 + 1 = 0

Binary Subtraction

Like addition, binary subtraction is done digit by digit to obtain the result.

  • 0 – 0 = 0
  • 1 – 0 = 1
  • 0 – 1 = 0
  • 1 – 1 = 0

Binary Multiplication

The rules for multiplying 2 binary numbers are given below:

  • 0 × 0 = 0
  • 0 × 1 = 0
  • 1 × 0 = 0
  • 1 ×1 = 1

Binary Division

The rules for dividing 2 binary numbers are given below:

  • 0 ÷ 1 = 0
  • 1 ÷ 1 = 1
  • 1 ÷ 0 = Meaningless
  • 0 ÷ 0 = Meaningless

Click here to learn more about addition, subtraction, multiplication, and division in the binary number system.

Complement of a Binary Number 

  • 1’s complement is obtained by inverting the digits of the binary number. For example, the complement of (110)2 is (001)2.
  • 2’s complement is given by inverting the digits of the number and adding 1 to the least significant bit. For example, 2’s complement of (111)2 is (001)2.

Solved Examples

Convert the binary number (111001)2 to its decimal number.

Solution:

The given binary number is (111001)2
To find the corresponding decimal number:
= (1 × 20) + (1 × 21) + (1 × 22) + (0 × 23) + (0 × 24) + (1 × 25)
= 1 + 2 + 4 + 8 + 16 + 32
 = 57
Thus, the corresponding decimal number is (57)10.

Convert the decimal number (134)10 to its binary number.

Solution:

The given decimal number is (134)10
To find the corresponding binary number:
134 ÷ 2 = 81, R = 0
81 ÷ 2 = 40, R = 1
40 ÷ 2 = 20, R = 0
20 ÷ 2 = 10, R = 0
10 ÷ 2 = 5, R = 1
5 ÷ 2 = 2, R = 1
2 ÷ 2 = 1, R = 0
1 ÷ 2 = 0, R = 1
Thus, the corresponding binary number is (10110010)2

Last modified on February 7th, 2024