0% found this document useful (0 votes)
59 views10 pages

L2-3 Binary Coded Decimal and Digital Codes

The document covers number systems and digital codes, focusing on Binary Coded Decimal (BCD), Gray Code, and their conversions. It outlines lesson objectives and provides examples for converting between binary, Gray code, and ASCII. Additionally, it includes a quiz to test understanding of the concepts presented.

Uploaded by

nan susu
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)
59 views10 pages

L2-3 Binary Coded Decimal and Digital Codes

The document covers number systems and digital codes, focusing on Binary Coded Decimal (BCD), Gray Code, and their conversions. It outlines lesson objectives and provides examples for converting between binary, Gray code, and ASCII. Additionally, it includes a quiz to test understanding of the concepts presented.

Uploaded by

nan susu
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/ 10

2.

Number Systems and Digital Codes

• Decimal & Binary Numbers and their Conversions

• Hexadecimal and Octal Numbers

• Binary Coded Decimal (BCD) and Digital Codes


Binary Coded Decimal (BCD) and Digital Codes

Lesson Outlines Lesson Objectives

1. Binary Coded Decimal (BCD) ▪ To clearly understand the Binary


2. The Gray Code Coded Decimal (BCD) and the
3. Binary-to-Gray Code Conversion Digital Codes
4. Gray-to-Binary Code Conversion
5. ASCII Code

2

Faculty of Computer Systems and Technologies 10
Binary Coded Decimal (BCD) and Digital Codes
1. Binary Coded Decimal (BCD)
• express each of the decimal digits with a binary Code
• only ten code groups

Decimal to BCD Conversion

BCD to Decimal Conversion

3

Faculty of Computer Systems and Technologies 10
Binary Coded Decimal (BCD) and Digital Codes
2. The Gray Code
• no specific weights assigned to the bit positions
• a single bit change from one code word to the next in sequence

Four-bit Gray code 4



Faculty of Computer Systems and Technologies 10
Binary Coded Decimal (BCD) and Digital Codes
3. Binary-to-Gray Code Conversion
• Left-most in the Gray code is the same as MSB in the binary number.
• Going from left to right, add each adjacent pair of binary code bits to get the
next Gray code bit. Discard carries.

EXAMPLE 2–1
Convert the binary number 10110 to Gray code.
Solution:

5

Faculty of Computer Systems and Technologies 10
Binary Coded Decimal (BCD) and Digital Codes
4. Gray-to-Binary Code Conversion
• The most significant bit (left-most) in the binary code is the same as the
corresponding bit in the Gray code
• Add each binary code bit generated to the Gray code bit in the next adjacent
position. Discard carries.

EXAMPLE 2–2

Convert the Gray code word 11011 to binary.


Solution:

6

Faculty of Computer Systems and Technologies 10
Binary Coded Decimal (BCD) and Digital Codes
5. ASCII Code
• American Standard Code for Information Interchange
• ASCII has 128 characters and symbols represented by a 7-bit binary code.

EXAMPLE 2–3 Convert the ASCII code “ if x>5 “ to binary and hexadecimal.

Solution:

7

Faculty of Computer Systems and Technologies 10
Binary Coded Decimal (BCD) and Digital Codes

https://commons.wikimedia.org/wiki/File:
ASCII-Table-wide.svg

8

Faculty of Computer Systems and Technologies 10
Binary Coded Decimal (BCD) and Digital Codes

Quiz

1. The BCD number for decimal 473 is ----------------.


2. Convert the BCD numbers “001000110111” to decimal. ------------------
3. Convert the decimal numbers “156” to 8421 BCD. -----------------------
4. Convert the binary number “1111011101110” to Gray code. ---------------------
5. Convert the Gray code “11000010001” to binary. ------------------------

9

Faculty of Computer Systems and Technologies 10
Thank You
For your attention

10

Faculty of Computer Systems and Technologies 10

You might also like