0% found this document useful (0 votes)
13 views15 pages

Lecture1414 - 12284 - Number Conversion

1) Number systems like binary, octal, decimal and hexadecimal are used to represent numbers in digital circuits and computers. Binary uses only 1s and 0s, while other systems use other bases to allow shorter representations of numbers. 2) Methods like division and remainders are used to convert between different number bases like decimal to binary, octal or hexadecimal. Conversions also involve determining the positional value of each digit. 3) Other codes like BCD and gray code have applications in digital displays and error correction. Binary addition and subtraction follow particular rules based on place values of 1s and 0s.

Uploaded by

anishkjainalpha
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)
13 views15 pages

Lecture1414 - 12284 - Number Conversion

1) Number systems like binary, octal, decimal and hexadecimal are used to represent numbers in digital circuits and computers. Binary uses only 1s and 0s, while other systems use other bases to allow shorter representations of numbers. 2) Methods like division and remainders are used to convert between different number bases like decimal to binary, octal or hexadecimal. Conversions also involve determining the positional value of each digit. 3) Other codes like BCD and gray code have applications in digital displays and error correction. Binary addition and subtraction follow particular rules based on place values of 1s and 0s.

Uploaded by

anishkjainalpha
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/ 15

Unit-3:

Number System(Conversion and codes)


Number System and
Digital system process binary digits 0 and 1
Code
Base 10 is important for everyday business
Base 2 is important for processing of digital circuit
Base 8 and Base 16 provide convenient shortened representation for multibit number in a digital
system
Number conversion
Methods or techniques used to convert numbers from one base to another
Decimal to Other
Step 1 − Divide the decimal number to be converted by the value of the other base.
Step 2 − Get the remainder from Step 1 as (least significant digit) of new base number
Step 3 − Divide the quotient of the previous divide by the new base.
Step 4 − Record the remainder from Step 3 as the next digit
Repeat Steps 3 and 4, getting remainders until the quotient becomes zero
The last remainder thus obtained will be the Most Significant bit(MSB) of the new base number.
Decimal to D ecim al to O ctal
Hexadecimal (569) 1 0  (1071) 8
(3509)10  (DB5)16
Other Base System to Decimal System
Step 1 − Determine positional value of each digit
Step 2 − Multiply the obtained position values by the digits in the corresponding columns.
Step 3 − Sum the products calculated in Step 2.
32 16

1
Octal to Decimal 1
3 2 1
4

0
 1024  448  40  4
 1 5 1 610 0
Hexadecimal to Decimal
(54.D2)1 6
 (5 161 )  (4 160 )  (13161
 11
)  (2
16 2 )
1
Binary to Octal
Step 1 − Divide the binary digits into groups of three (starting from the right).
Step 2 − Convert each group of three binary digits to one octal digit.

Octal to Binary

Step 1 − Convert each octal digit to a 3 digit binary number.


Step 2 − Combine all the resulting binary groups (of 3 digits each) into a single
binary number
Binary to Hexadecimal
Step 1 − Divide the binary digits into groups of four (starting from the right).
Step 2 − Convert each group of four binary digits to one hexadecimal symbol.

Hexadecimal to Binary
Step 1 − Convert each hexadecimal digit to a 4 digit binary number.
Step 2 − Combine all the resulting binary groups (4 digits each) into a single binary number.

8421
(1101)2  8  4 1 
(13)10
(0111)2  710
(1010)2  (10)10  A16
(10101) 2
Practice Question
(4021.5)5  (
)10 (B65F )16  ( )10
(630.4)8  (
)10
(0.6875)10  (

)2
(0.513)10  (

(306.D)16  (
BCD (Binary Coded Decimal)

• Do not get confused, BCD is not the same as hexadecimal.


• Main advantage of BCD - Easy conversion between decimal
and binary form.
• However, disadvantage - BCD code is wasteful as the
states between 1010 (decimal 10), and 1111 (decimal 15) are not
used.

• Nevertheless, BCD has many important applications especially using


digital displays.
Gray Code (Cyclic Code, or Reflected Binary Code )
• Ordering of the binary number system such that each incremental value can only
differ by one bit.
• Gray code is not weighted that means it does not depends on positional value of digit.
• it is not suitable for arithmetic operations.

Some other applications of gray code:


• Boolean circuit minimization.
• Error correction in communication system
Binary
Addition
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10 (which is 0 carry 1)

(1001 0 ) 2  (1001) 2  ?
Binary
Subtraction

(1100) 2  (1010) 2
?

You might also like