Professional Documents
Culture Documents
Tutorial 1
Tutorial 1
16.01.2024
17.01.2024
18.01.2024
22.01.2024
Contents
1/15/2023 2
1/15/2023 3
1/15/2023 4
1/15/2023 5
1/15/2023 6
1/15/2023 7
1/15/2023 8
(0.35)10 = (0.01011)2
(3479)10 = (79D)16
1/15/2023 10
(4C57F)16 = (01001100010101111111)2
Conversion of long binary numbers
▪ Divide it into groups of 4 bits (starting from the right i.e., the LSB).
▪ Write the hex representation of each 4-bit binary group.
1/15/2023 11
1/15/2023 12
1. BCD Code
• Many different binary codes are used in digital & electronic
circuits, each with its own specific use.
• Humans prefer decimal number systems.
• We need to convert these decimal numbers in to base-2
environment so that computers and digital electronic devices
understand.
• BCD or binary-coded decimals allow us to do the same.
• Key advantage of the BCD system: Each decimal digit is
represented by a group of 4 binary digits or bits similar to
Hexadecimal.
• 10 decimal digits (0 to 9): 4 bit long binary code.
1/15/2023 13
• Thus in BCD, six combinations 10, 11, 12, 13, 14 and 15 are
considered forbidden and hence cannot be used.
• This will also introduce a correction factor of 6 which will be
discussed later.
• BCD is also known as 8421 code due to its weighted
codification originating as a result of 4 bit group representation.
1/15/2023 14
1/15/2023 15
1/15/2023 16
Find the binary, hex and packed BCD representation of the decimal
numbers 126 and 245. Also, write the packed BCD in the hex format.
1/15/2023 17
To support the listed 4 functions, both gates and memory cells will be required.
1/15/2023 19