[go: up one dir, main page]

0% found this document useful (0 votes)
40 views29 pages

Lecture 3 (Hexa - Octal - BCD)

This document provides an overview of number systems including: Hexadecimal numbers - How to convert between hexadecimal, binary, and decimal numbers with examples. Hexadecimal uses base 16. Octal numbers - How to convert between octal, binary, and decimal numbers with examples. Octal uses base 8. Other number codes discussed include binary coded decimal (BCD), Gray code, and ASCII code. BCD represents each decimal digit with a 4-bit binary number. Gray code ensures only one bit changes between successive codes. ASCII defines codes for English characters, punctuation, and control codes.

Uploaded by

Mina Ashraf
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)
40 views29 pages

Lecture 3 (Hexa - Octal - BCD)

This document provides an overview of number systems including: Hexadecimal numbers - How to convert between hexadecimal, binary, and decimal numbers with examples. Hexadecimal uses base 16. Octal numbers - How to convert between octal, binary, and decimal numbers with examples. Octal uses base 8. Other number codes discussed include binary coded decimal (BCD), Gray code, and ASCII code. BCD represents each decimal digit with a 4-bit binary number. Gray code ensures only one bit changes between successive codes. ASCII defines codes for English characters, punctuation, and control codes.

Uploaded by

Mina Ashraf
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
You are on page 1/ 29

CC216

Digital Logic Design


Lecture 3
Number Systems
(Cont.)
Outlines

- Hexadecimal Numbers

- Octal Numbers

-Codes
- Binary coded decimal (BCD)
- Gray code
- ASCII code
Hexadecimal Numbers
Hexadecimal Numbers
Hexadecimal Numbers

Counting in Hexadecimal
Hexadecimal Numbers

Binary-to-Hexadecimal Conversion
EXAMPLE
Hexadecimal Numbers

Hexadecimal-to-Binary Conversion
EXAMPLE
Hexadecimal Numbers
Hexadecimal-to-Decimal Conversion
One way to find the decimal equivalent of a hexadecimal number is to first convert the
hexadecimal number to binary and then convert from binary to decimal
EXAMPLE
Hexadecimal Numbers
Another way to convert a hexadecimal
number to its decimal equivalent is to
multiply the decimal value of each
hexadecimal digit by its weight and then
take the sum of these products.
EXAMPLE
Hexadecimal Numbers
Decimal-to-Hexadecimal Conversion
Repeated division of a decimal number by 16 will produce the equivalent hexadecimal
number, formed by the remainders of the divisions.
EXAMPLE
Octal Numbers
Octal Numbers
Octal Numbers

Octal-to-Decimal Conversion
The evaluation of an octal number in terms of its decimal equivalent is
accomplished by multiplying each digit by its weight and summing the
products, as illustrated here for 2374 .
8
Octal Numbers

Decimal-to-Octal Conversion
let’s convert the decimal number 359 to Octal
Octal Numbers
Octal-to-Binary Conversion

Because each octal digit can be represented by a 3-bit binary


number, it is very easy to convert from octal to binary.
Each octal digit is represented by three bits as shown below:

To convert an octal number to a binary number, simply


replace each octal digit with the appropriate three bits.
Octal Numbers

EXAMPLE
Octal Numbers

Binary-to-Octal Conversion

Conversion of a binary number to an octal number is the


reverse of the octal-to-binary conversion.
The procedure is as follows: Start with the right-most group of
three bits and, moving from right to left, convert each 3-bit
group to the equivalent octal digit.
If there are not three bits available for the left-most group, add
either one or two zeros to make a complete group. These
leading zeros do not affect the value of the binary number.
Octal Numbers

EXAMPLE
Binary Coded Decimal
(BCD)
Binary Coded Decimal (BCD)
Binary coded decimal (BCD)
Binary coded decimal (BCD)
Gray code
Gray code
Gray code
American Standard Code for Information Interchange
(ASCII)
American Standard Code for Information Interchange
(ASCII)
Questions

You might also like