Posted in

Binary numbers

Binary numbers are the foundation of computer systems and digital electronics. They use base-2, consisting of only two digits: 0 and 1.


Why Binary?

  • Computers use binary because electrical circuits have two states: on (1) and off (0).
  • Binary representation is simple and efficient for electronic hardware.

Binary vs. Decimal

Decimal (Base 10)Binary (Base 2)
00
11
210
311
4100
5101
6110
7111
81000
91001

Converting Between Binary and Decimal

Binary to Decimal

Each binary digit represents a power of 2, from right to left.

Example: Convert 1011 to decimal:1×23+0×22+1×21+1×20=8+0+2+1=111 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0 = 8 + 0 + 2 + 1 = 111×23+0×22+1×21+1×20=8+0+2+1=11

Decimal to Binary (Division Method)

Keep dividing by 2 and record the remainder until the quotient is 0.

Example: Convert 13 to binary:

  1. 13 ÷ 2 = 6, remainder = 1
  2. 6 ÷ 2 = 3, remainder = 0
  3. 3 ÷ 2 = 1, remainder = 1
  4. 1 ÷ 2 = 0, remainder = 1

Binary: 1101


Binary Arithmetic

Addition

BinaryResult
0 + 00
0 + 11
1 + 01
1 + 110 (carry 1)

Example: 101 + 11

markdownCopyEdit  101  
+ 011  
------
 1000

Subtraction (using borrowing rules)

Multiplication (like decimal multiplication)

Division (similar to long division in decimal)


Applications of Binary Numbers

  • Computer Memory: Data storage and processing.
  • Networking: IP addressing in binary.
  • Digital Electronics: Designing logic circuits.
  • Encoding: Images, audio, and text.

Leave a Reply

Your email address will not be published. Required fields are marked *