0% found this document useful (0 votes)
2 views6 pages

Number System Updated

The document explains various number systems, including binary, decimal, hexadecimal, and octal, detailing their bases and how to convert between them. It provides step-by-step methods for converting binary to decimal and vice versa, as well as hexadecimal to octal and binary. Additionally, it discusses the addition of binary numbers and the calculation of possible patterns based on the number of bits.

Uploaded by

tariqsaint9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

Number System Updated

The document explains various number systems, including binary, decimal, hexadecimal, and octal, detailing their bases and how to convert between them. It provides step-by-step methods for converting binary to decimal and vice versa, as well as hexadecimal to octal and binary. Additionally, it discusses the addition of binary numbers and the calculation of possible patterns based on the number of bits.

Uploaded by

tariqsaint9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1

NUMBER SYSTEMS

A number system defines how numbers are represented using symbols (digits). It’s based on a
base (or radix), which determines how many unique digits are used.

Types of Number Systems

1. Binary Numbers

• A binary number is made up of only 0s and 1s.


• It’s used by computers because they operate using two states: on (1) and off (0).
• Each digit represents a power of 2 (e.g., 1, 2, 4, 8, 16…).

2. Decimal Numbers

• The decimal system (base 10) uses digits 0–9.


• Each digit is a power of 10 (e.g., 1, 10, 100…).

3. Conversion: Binary to Decimal

To convert binary to decimal:

• Multiply each binary digit by 2 raised to its position (starting from the right).
• Add the results.

Example:
Binary 1011 = (1×2³) + (0×2²) + (1×2¹) + (1×2⁰)
= 8 + 0 + 2 + 1 = 11

4. Conversion: Decimal to Binary

To convert decimal to binary:

• Divide the number by 2 repeatedly.


• Record the remainders.
• Read the remainders from bottom to top.
2
NUMBER SYSTEMS

Example:
Convert 13 to binary:
13 ÷ 2 = 6 R1
6 ÷ 2 = 3 R0
3 ÷ 2 = 1 R1
1 ÷ 2 = 0 R1 → Read bottom-up = 1101

Examples

Converting binary numbers to decimal

Method:

Multiply each binary digit by 2 raised to the power of its position (from right to left), then add all
results.

Example 1: Binary 1010

= (1×2³) + (0×2²) + (1×2¹) + (0×2⁰)


= 8 + 0 + 2 + 0 = 10

Example 2: Binary 111

= (1×2²) + (1×2¹) + (1×2⁰)


=4+2+1=7

Example 3: Binary 1001

= (1×2³) + (0×2²) + (0×2¹) + (1×2⁰)


=8+0+0+1=9

Example 4: Binary 1101


3
NUMBER SYSTEMS

= (1×2³) + (1×2²) + (0×2¹) + (1×2⁰)


= 8 + 4 + 0 + 1 = 13

Example 5: Binary 1111

= (1×2³) + (1×2²) + (1×2¹) + (1×2⁰)


= 8 + 4 + 2 + 1 = 15

Converting decima numbers to Binary

Steps:

1. Divide the decimal number by 2.


2. Record the remainder.
3. Continue dividing the quotient by 2 until it becomes 0.
4. Read the remainders bottom to top to get the binary number.

Example 1: Decimal 10 → Binary

10 ÷ 2 = 5 R0
5 ÷ 2 = 2 R1
2 ÷ 2 = 1 R0
1 ÷ 2 = 0 R1
Binary = 1010

Example 2: Decimal 7 → Binary

7 ÷ 2 = 3 R1
3 ÷ 2 = 1 R1
1 ÷ 2 = 0 R1
Binary = 111

Example 3: Decimal 12 → Binary

12 ÷ 2 = 6 R0
6 ÷ 2 = 3 R0
3 ÷ 2 = 1 R1
4
NUMBER SYSTEMS

1 ÷ 2 = 0 R1
Binary = 1100

Converting Hexadecimal to Octal (Base 16 → Base 8)

Hexadecimal (base 16) and octal (base 8) are often used in computing. The easiest way to
convert hex to octal is through binary as an intermediate step.

Step-by-Step Method:

1. Convert Hexadecimal to Binary


o Each hex digit = 4 binary bits
o Example: 2F → 0010 1111
2. Group Binary Digits in Sets of 3 (from right to left)
o 0010 1111 → 000 010 111 111
3. Convert Each Group to Octal
o 000 = 0, 010 = 2, 111 = 7, 111 = 7
o Octal result: 0277

Example:

Convert Hex 2F to Octal:

• Hex 2F = Binary 00101111


• Binary 00101111 = Octal 57

Converting Hexadecimal to Binary (Base 16 → Base 2)

Each hex digit converts directly to a 4-bit binary group. This makes conversion quick and
straightforward.

Conversion Table:

Hex Binary
0 0000
1 0001
2 0010
5
NUMBER SYSTEMS

Hex Binary
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111

Example: Convert Hex 2F to Binary

• 2= 0010
• F= 1111
• So, 2F = 00101111 (binary)

Determining Patterns of bits that are possible with the following

Formula:

Number of patterns = 2ⁿ, where n is the number of bits.

Examples:

• 6 bits → 2⁶ = 64 patterns (from 000000 to 111111)


• 7 bits → 2⁷ = 128 patterns
• 8 bits → 2⁸ = 256 patterns

Adding binary numbers in both decimal and binary forms


Example 1011 and 101
6
NUMBER SYSTEMS

Step 1: Align the numbers (right to left)

1011 (11 in decimal)

+ 101 (5 in decimal)

1011

+ 0101

Step 2: Add the binary numbers (from right to left)

1 + 1 = 0 (carry 1)

1 + 0 + carry 1 = 0 (carry 1)

0 + 1 + carry 1 = 0 (carry 1)
1 + 0 + carry 1 = 0 (carry 1)

New carry = 1

Result is: 10000

Final Result

• Binary Sum: 10000


• Decimal Sum: 11 + 5 = 16

You might also like