3 Digital Representation
3 Digital Representation
Digital
Representation
Content:
1. Introduction
2. Signed and unsigned
representation
3. BCD
4. Excess-3
5. ASCII code
6. Binary floating point data
7. Basic gates and function
Introduction
Why digital
Advantages:
Easy to design
Information storage is easy
Accuracy and precision are greater
Operation can be programmed
Less effected by noise
Small in size
Disadvantage:
Needs conversion process – analog – digital - analog
Introduction
Digital ICs – collection of resistors, diodes and transistors
fabricated on a single piece of semiconductor material called
chip
Package type
DIP / PDIP – Dual-In-Line Package / Plastic Dual-In-Line Package
SOIC – Small Outline Integrated Circuit
TQFP – Thin-Quad Flatpack Package
QFN - Quad Flat No Lead Package
PLCC – Plastic Leaded Chip Carrier
Introduction
Categorizations of chips:
6 levels of circuit complexity
BCD6221
BCD4221
Binary-Coded-Decimal (BCD)
Question:-
Change the following decimal number
into BCD
21
99
54
23
Binary-Coded-Decimal (BCD)
Question:-
Change the following decimal number
into BCD6221
21
99
54
23
Binary-Coded-Decimal (BCD)
Question:-
Change the following decimal number
into BCD4221
21
99
54
23
Excess-3
Used on older computers.
Biased by 3
Excess-3
Question:-
Change the following decimal number
into Excess-3
12
21
11
2343
ASCII
ASCII
Question:-
Change the following decimal number
into ASCII
12
21
11
23 43
Binary Floating Point
A way to represent floating point
Can be either
32 bit single precision
(S - 31, E - 23-30, F – 0-22)
64 bit double precision
(S – 63, E – 51-62, F – 0-51)
Binary Floating Point
Example:
Binary Floating Point
3. That number is then normalized; the binary point is
moved left, leaving only a 1 to its left.
4. The number of places it is moved gives the (power
of two) exponent 1110110.101 becomes
1.110110101 x 26.
5. After this process, the first binary digit is always a
1, so it is need not be included in the encoding. The
rest is the part to the right of the binary point,
which is then padded with zeros on the right to
make 23 bit in all.
6. The exponent is 6 and should be biased by +127.
Thus, exponential is 6+127=133 (10000101)
Binary Floating Point
Binary Floating Point
Question:
Convert the following decimal number
to a 32 bit single precision binary
floating point.
-12.5
234.25
21.625
Gray Code
Code where only one bit changes as it
counts from top to bottom.
It cannot be used in arithmetic.
It is used in a digital system where a
single movement is critical.
Grey Code
BIN GREY CODE BIN GREY CODE
0000 0000 1000 1100
0001 0001 1001 1101
0010 0011 1010 1111
0011 0010 1011 1110
0100 0110 1100 1010
0101 0111 1101 1011
0110 0101 1110 1001
0111 0100 1111 1000
Grey Code
Question:-
Change the following decimal number
into grey code
12
21
11
99
Basic Gates and Function
AND,
OR,
NOT,
NAND,
NOR,
XOR,
XNOr,
Sample Questions
Sample Questions
Sample Questions
Sample Questions
Give a result of following question:
1. $AA AND $55 =
2. $0F OR $AA =
3. $C5 EOR $33 =
4. $E3 NOR 32 =
More Sample Questions
1. The correct hexadecimal equivalent for 1100 1010
0111 10012 is ___________.
2. How many binary digits make up a byte?
___________.
3. How many bytes are in hexadecimal number
CBD927? _____________.
4. The uppercase Q has an ASCII code of 101 0001,
what are the octal and hexadecimal equivalents?
__________8 (octal) and __________16(Hex).
5. The weigh of MSB of a 6 bit binary number is
__________.
More…
6. Each hexadecimal digit converts to
__________ binary digits.
7. In BCD, the decimal number 25 converts to
________digits.
8. Even parity, means that the byte contains
an _________ number of ones.
9. Convert 1100 11012 to its decimal
equivalent. __________ .
10. The decimal value for EC16 is __________.