0% found this document useful (0 votes)
4 views16 pages

L 2 (Theory)

The document outlines a lecture on Digital Logic Design, focusing on BCD (Binary Coded Decimal), parity bits, and number system conversions. It provides methods for converting numbers between different bases and includes examples and exercises for practice. Additionally, it discusses the concept of parity bits for error detection in data communication.

Uploaded by

sayem2305101376
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)
4 views16 pages

L 2 (Theory)

The document outlines a lecture on Digital Logic Design, focusing on BCD (Binary Coded Decimal), parity bits, and number system conversions. It provides methods for converting numbers between different bases and includes examples and exercises for practice. Additionally, it discusses the concept of parity bits for error detection in data communication.

Uploaded by

sayem2305101376
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/ 16

Department of Computer Science and Engineering

Daffodil International University

BCD, Parity bit and practice different number system conversion

Course Title: Digital Logic Design


Course Code: CSE 223

Prepared By:
Bakhtiar Muiz
Lecturer, Dept. of CSE, DIU

CSE233@DIU, SPRING 2025 1


Department of Computer Science and Engineering
Daffodil International University
Today’s Lecture

1. BCD and Parity bit and practice different number system conversion.

CSE233@DIU, SPRING 2025 2


Department of Computer Science and Engineering
Daffodil International University
Number Conversion
❑Converting a Number of Some Base to a Number of Another Base.

Method
Step 1: Convert the number to the decimal base number

Step 2: Convert the decimal number to the new base number

CSE233@DIU, SPRING 2025 3


Department of Computer Science and Engineering
Daffodil International University
Example

❑(545)6 = (?)4
❑Solution:
❑Step 1: Convert from base 6 to base 10

CSE233@DIU, SPRING 2025 4


Department of Computer Science and Engineering
Daffodil International University
Example

❑(545)6 = (?)4
❑Solution:
❑Step 2: (Convert 209)10 to base 4

CSE233@DIU, SPRING 2025 5


Department of Computer Science and Engineering
Daffodil International University
Self Practice

❑Convert (3211)4 to ( ? )5
❑Convert (1001001100)2 to ( ? )6
❑Convert (2724)8 to ( ? )5

CSE233@DIU, SPRING 2025 6


Department of Computer Science and Engineering
Daffodil International University
BCD and Parity Bit in Digital Logic Design

❑BCD means Binary Coded Decimal


❑A number with k decimal digits will require 4 bits in BCD
❑Consider decimal 185 and its corresponding value in BCD and binary:
❑(185)10 = (0001 1000 0101)BCD = (10111001)2
❑the representation of a BCD number needs more bits than its equivalent binary value.

CSE233@DIU, SPRING 2025 7


Department of Computer Science and Engineering
Daffodil International University
BCD and Parity Bit in Digital Logic Design

❑Binary Coded Decimal (BCD) is a system of writing numbers that assigns a four-digit
binary code to each digit 0 to 9 in a decimal (base-10) numeral.
❑The four-bits BCD code for any particular single base-10 digit is its representation in
binary notation given below.

CSE233@DIU, SPRING 2025 8


Department of Computer Science and Engineering
Daffodil International University
Exercise

❑Convert (123)10 in BCD


❑Convert (324)10 in BCD

CSE233@DIU, SPRING 2025 9


Department of Computer Science and Engineering
Daffodil International University
Binary Code Types

CSE233@DIU, SPRING 2025 10


Department of Computer Science and Engineering
Daffodil International University
Binary Code Types

❑Consider the following three BCD additions:

CSE233@DIU, SPRING 2025 11


Department of Computer Science and Engineering
Daffodil International University
Binary Code Types

Excess-3 means 3
add with decimal
value

At first,
multiply every
binary bit with
corresponding
weight, then
finally
performed
addition

CSE233@DIU, SPRING 2025 12


Department of Computer Science and Engineering
Daffodil International University
Binary Code Types

Only One bit


changes every time

CSE233@DIU, SPRING 2025 13


Department of Computer Science and Engineering
Daffodil International University
Error‐Detecting Code

❑To detect errors in data communication and processing, an eighth bit is sometimes
added to the ASCII character to indicate its parity. A parity bit is an extra bit included
with a message to make the total number of 1’s either even or odd

Hints: Count
number of 1
only, then
check
whether it is
odd or even

CSE233@DIU, SPRING 2025 14


Department of Computer Science and Engineering
Daffodil International University
Practice:

❑Convert (45)10 = (?)XS3


❑Convert (45)10 = (?)2421
❑ Convert (45)10 = (?)Gray Code

CSE233@DIU, SPRING 2025 15


Department of Computer Science and Engineering
Daffodil International University

Thank you for hearing with


patience

CSE233@DIU, SPRING 2025 16

You might also like