0% found this document useful (0 votes)
23 views22 pages

Aditya's

The document provides an overview of number systems, focusing on decimal, binary, octal, and hexadecimal systems, along with their conversions. It explains techniques for converting between these systems, including one's and two's complements, and provides examples for clarity. Additionally, it outlines methods for converting binary, octal, and hexadecimal numbers to decimal and vice versa.

Uploaded by

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

Aditya's

The document provides an overview of number systems, focusing on decimal, binary, octal, and hexadecimal systems, along with their conversions. It explains techniques for converting between these systems, including one's and two's complements, and provides examples for clarity. Additionally, it outlines methods for converting binary, octal, and hexadecimal numbers to decimal and vice versa.

Uploaded by

aaravdeepak96
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

NUMBER SYSTEM

&
CONVERSION

Presented by Aditya R
WHAT IS NUMBER SYSTEM ?

• The number system that we


use in our day-to-day life is
the decimal number system.
Decimal number system has
base 10 as it uses 10 digits
from 0 to 9. In decimal
number system , the
successive positions to the left
of the decimal point represent
units, tens, hundreds,
thousand and so on.
COMPLEMENT OF NUMBER
• One's complement: In binary system, if
each 1 is replaced by 0and each 0 by 1,
then resulting number is called as one's
complement of the that number.
• If first number is positive then resulting will
be negative with the same magnitude and
vice versa.
• In binary arithmetic 1's complement of a
binary number N is obtained by the formula
= (2n-1) – N
• Where n is the no of bits in
binary number N.
EXAMPLE
• Convert binary number 111001101 to 1's complement.
• Method:
• Replace 0 with 1 and vice versa.
• N=111001101
• Answer:
• 1's complement of N is 000110010
TWO’S COMPLEMENT
• Two's complement: If 1 is
added to the complement
of a number then resulting
number is known as two's
complement.
• If MSB is 0 then the
number is positive else if
MSB is 1 then the number
is negative.
• 2's complement of a binary
number N is obtained by
the formula (2n) - N, Where
n is the no of
bits in number N
EXAMPLE
• Convert binary number 111001101 to 2's complement
• Method:
• 2's complement of a binary no can be obtained by two step
process
• Step 1
• 1's complement of number N = 000110010
• Step 2
• 1's complement + 1
• 000110010 +000000001 = 000110011
• Answer
• 2's complement of a binary no 111001101 is 000110011
BINARY TO DECIMAL

• Technique
• Multiply each bit by 2n,
where n is the "weight" of
the bit
• The weight is the position
of the bit, starting from 0
on the right
• Add the results
EXAMPLE
• (101011) 2 => 1 * 2 0
=1
• 1 * 2 1
=2
• 0 * 2 2
=0
• 1 * 2 3
=8
• 0 * 2 4
=0
• 1 * 2 5
=32
• (43)10
OCTAL TO DECIMAL

• Technique:

Multiply each bit by 8n, where n is the


"weight" of the bit.
• The weight is the position of the bit,
starting from 0 on the right.
• Add the results
EXAMPLE
• (724)8
◦ 4 x 80 =4
◦ 2 x 81 =16
◦ 7 x 82 =
448

=(468)10

HEXADECIMAL TO DECIMAL

• Technique:
• • Multiply each bit by 16n, where n is the
"weight" of the bit
• • The weight is the position of the bit,
starting from 0 on the right
• • Add the results
EXAMPLE

• (ABC)16=> C x 16 0
= 12 x 1
=12
• B x 16 1 =11 x 16
=176
• A x 16 2
=10 x 256
=2560

(2748)10
OCTAL TO BINARY

• Technique
• Convert each octal digit to a 3 bit
equivalent binary representation.

• (705) 8 =
• 7 0 5
• 111 000 101
• (705)8= 111000101
DECIMAL TO BINARY
• * Technique
• * Divide by two, keep track of the
remainder
• * First remainder is bit 0 (LSB, least-
significant bit)
• Second remainder is bit 1
EXAMPLE
• (125)10=? 2 125 Remainder

2 62 1

2 31 0
• (125)10=1111101
2 15 1

2 7 1

2 3 1

2 1 1

0 1
HEXADECIMAL TO BINARY

• Technique
• Convert each hexadecimal digit
to a 4 bit equivalent binary
representation.
• (10AF) 16 = (?)2
• 1 0 A F
• 0001 0000 1010 1111
• (10AF)16 = 0001000010101111
Find the one’s complement of the following 8-bit binary
numbers:11000011
Solution
• Step 1: Write the given binary number
• 11000011
• Step 2: Invert all bits (0 → 1, 1 → 0)
• 00111100
• The one's complement of 11000011 is 00111100.
To find the two’s complement of the 8-bit binary number
00100110
Solution
• Step 1: Write the given binary number
• 00100110
• Step 2: Find the One’s Complement (Invert all bits)
• 11011001
• Step 3: Add 1 to the One’s Complement
• 11011001 + 1 ------------ 11011010
• Final Answer:
• The two’s complement of 00100110 is 11011010.
Convert 725₈ (octal) to decimal.

Solution
• Step 1: Write the positional values
• 7258​=(7×82)+(2×81)+(5×80)
• Step 2: Solve each term
• (7×64)+(2×8)+(5×1)
• 448+16+5=469
• Final Answer:
• 7258​=46910​
Convert 45₁₀ (decimal) to binary.

Solution

• Convert 45₁₀ (decimal) to binary.


2
• Step 1: Divide by 2 and note the remainder 45 Remainder

2 22 1

2 11 0

• Read the remainders from bottom to top2 5 1

• 4510​=1011012​ 2 2 1

2 1 0

0 1
Convert 11000011₂ to decimal.

Solution
• Step 1: Write the binary number and assign powers of 2
• Each digit in the binary number represents a power of 2, starting
from the right (2⁰, 2¹, 2², ...).
• Binary: 1 1 0 0 0 0 1 1
• Powers: 2⁷ 2⁶ 2⁵ 2⁴ 2³ 2² 2¹ 2⁰
• Values: 128 64 0 0 0 0 2 1
• Step 2: Add the values together
• 128+64+2+1=195

You might also like