Ali Adib Arnab�Senior Lecturer and Chairman, Department of Electrical and Electronic Engineering�University of Global Village�MSc in Telecommunication and Wireless Systems and Management, Queen Mary University of London
My Google Site Link: https://sites.google.com/view/ali-adib-arnab/home
Digital Electronics (EEE 207)
Topic 1
Digital System and Binary Numbers
Digital Computer and Digital System
Digital Systems and Binary Numbers
Digital age and information age
Digital computers
Digital systems
Discrete information-processing systems
Analog and Digital Signal
Analog system
The physical quantities or signals may vary continuously over a specified range.
Digital system
The physical quantities or signals can assume only discrete values.
Greater accuracy
t
X(t)
t
X(t)
Analog signal
Digital signal
Block diagram of
a digital computer:
Decimal Number System
1
0
-1
2
-2
5
1
2
7
4
10
1
0.1
100
0.01
500
10
2
0.7
0.04
d2*B2+d1*B1+d0*B0+d-1*B-1+d-2*B-2
(512.74)10
Octal Number System
1
0
-1
2
-2
8
1
1/8
64
1/64
5
1
2
7
4
5 *82+1 *81+2 *80+7 *8-1+4 *8-2
=(330.9375)10
(512.74)8
Binary Number System
8 bits = Byte
1
0
-1
2
-2
2
1
1/2
4
1/4
1
0
1
0
1
1 *22+0 *21+1 *20+0 *2-1+1 *2-2
=(5.25)10
(101.01)2
1 0 1 1
1 1 0 0 0 1 0 1
Hexadecimal Number System
1
0
-1
2
-2
16
1
1/16
256
1/256
1
E
5
7
A
1 *162+14 *161+5 *160+7 *16-1+10 *16-2
=(485.4765625)10
(1E5.7A)16
The Power of 2
n | 2n |
0 | 20=1 |
1 | 21=2 |
2 | 22=4 |
3 | 23=8 |
4 | 24=16 |
5 | 25=32 |
6 | 26=64 |
7 | 27=128 |
n | 2n |
8 | 28=256 |
9 | 29=512 |
10 | 210=1024 |
11 | 211=2048 |
12 | 212=4096 |
20 | 220=1M |
30 | 230=1G |
40 | 240=1T |
Mega
Giga
Tera
Kilo
Number System
Number conversions for r=2
Decimal to Binary
Binary to Decimal
Decimal to Binary Binary to Decimal
Number conversions for r=2 with fractions
Decimal (Integer) to Binary Conversion
Example: (13)10
Quotient
Remainder
Coefficient
Answer: (13)10 = (a3 a2 a1 a0)2 = (1101)2
MSB LSB
13
/ 2 = 6
1 a0 = 1
6
/ 2 = 3
0 a1 = 0
3
/ 2 = 1
1 a2 = 1
1
/ 2 = 0
1 a3 = 1
Decimal (Fraction) to Binary Conversion
Example: (0.625)10
Integer
Fraction
Coefficient
Answer: (0.625)10 = (0.a-1 a-2 a-3)2 = (0.101)2
MSB LSB
0.625
* 2 = 1 . 25
0.25
* 2 = 0 . 5 a-2 = 0
0.5
* 2 = 1 . 0 a-3 = 1
a-1 = 1
Decimal to Octal Conversion
Example: (175)10
Quotient
Remainder
Coefficient
Answer: (175)10 = (a2 a1 a0)8 = (257)8
175
/ 8 = 21
7 a0 = 7
21
/ 8 = 2
5 a1 = 5
2
/ 8 = 0
2 a2 = 2
Example: (0.3125)10
Integer
Fraction
Coefficient
Answer: (0.3125)10 = (0.a-1 a-2 a-3)8 = (0.24)8
0.3125
* 8 = 2 . 5
0.5
* 8 = 4 . 0 a-2 = 4
a-1 = 2
Binary − Octal Conversion
Octal | Binary |
0 | 0 0 0 |
1 | 0 0 1 |
2 | 0 1 0 |
3 | 0 1 1 |
4 | 1 0 0 |
5 | 1 0 1 |
6 | 1 1 0 |
7 | 1 1 1 |
Example:
( 1 0 1 1 0 . 0 1 )2
( 2 6 . 2 )8
Assume Zeros
Works both ways (Binary to Octal & Octal to Binary)
Binary − Hexadecimal Conversion
Hex | Binary |
0 | 0 0 0 0 |
1 | 0 0 0 1 |
2 | 0 0 1 0 |
3 | 0 0 1 1 |
4 | 0 1 0 0 |
5 | 0 1 0 1 |
6 | 0 1 1 0 |
7 | 0 1 1 1 |
8 | 1 0 0 0 |
9 | 1 0 0 1 |
A | 1 0 1 0 |
B | 1 0 1 1 |
C | 1 1 0 0 |
D | 1 1 0 1 |
E | 1 1 1 0 |
F | 1 1 1 1 |
Example:
( 1 0 1 1 0 . 0 1 )2
( 1 6 . 4 )16
Assume Zeros
Works both ways (Binary to Hex & Hex to Binary)
Octal − Hexadecimal Conversion
Example:
( 0 1 0 1 1 0 . 0 1 0 )2
( 1 6 . 4 )16
Assume Zeros
Works both ways (Octal to Hex & Hex to Octal)
( 2 6 . 2 )8
Assume Zeros
Addition
5
5
5
5
+
0
1
1
= Ten ≥ Base
🡺 Subtract a Base
1
1
Carry
Binary Addition
1
0
1
1
1
1
1
1
1
1
0
+
0
0
0
0
1
1
1
≥ (2)10
1
1
1
1
1
1
= 61
= 23
= 84
Binary Subtraction
0
0
1
1
1
0
1
1
1
1
0
−
0
1
0
1
1
1
0
= (10)2
2
2
2
2
1
0
0
0
1
= 77
= 23
= 54
Binary Multiplication
0
1
1
1
1
0
1
1
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
0
0
0
0
0
0
1
1
0
1
1
1
0
x
1.5 Complements
(rn –1) – N
Complements
Example (10110000)2
⇨ (01001111)2
If you add a number and its 1’s complement …
1 0 1 1 0 0 0 0
+ 0 1 0 0 1 1 1 1
1 1 1 1 1 1 1 1
Complements
The r's complement of an n-digit number N in base r is defined as
rn – N for N ≠ 0 and as 0 for N = 0. Comparing with the (r − 1) 's complement, we note that the r's complement is obtained by adding 1 to the (r − 1) 's complement, since rn – N = [(rn − 1) – N] + 1.
The 10's complement of 012398 is 987602
The 10's complement of 246700 is 753300
The 2's complement of 1101100 is 0010100
The 2's complement of 0110111 is 1001001
Complements
Example:
Number:
1’s Comp.:
0 1 0 1 0 0 0 0
1 0 1 1 0 0 0 0
0 1 0 0 1 1 1 1
+ 1
OR
1 0 1 1 0 0 0 0
0
0
0
0
1
0
1
0
Complements
There is no end carry. Therefore, the answer is Y – X = − (2's complement of 1101111) = − 0010001.
Complements
There is no end carry, Therefore, the answer is Y – X = − (1's complement of 1101110) = − 0010001.
Comparison between 1’s and 2’s Complements
Comparison between 1’s and 2’s Complements
Signed Binary Numbers
Signed Binary Numbers
Signed Binary Numbers
Binary Codes
Binary Codes
Binary Code
Binary Code
Error Detection Code
Error Detection Code…
Error Detection Code…
The Reflected Code
The Reflected Code…
In the brief period of changing, the switches will read some spurious position.
Transition might look like 011-001-101-100
The observer can not tell if that is reading a real position or a transitional state between two states.
The reflected binary code solves this problem- changing only one switch at a time – cyclic property.
Also known as Gray code, Single distance code (Hamming distance=1)
The Reflected Code…
Alphanumeric Code
Alphanumeric Code…
ASCII Character Codes
American Standard Code for Information Interchange (Refer to Table 1.7)
A popular code used to represent information sent as character-based data.
It uses 7-bits to represent:
Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return).
Other non-printing characters are used for record marking and flow control (e.g. STX and ETX start and end text areas).
Binary Codes
Binary Storage and Registers
1bit
Cell
Excitation signal to set a state
Physical quantity that differs
between two states
Registers
Register Transfer
Transfer of Information among Registers
Example of Binary Information Processing
Switching Circuits and Binary Signal
circuit.
Logic 1 Logic 0
Switching Circuits
L = A + B
L = A . B
L = A‘
bulb
Switch A
Switching Circuits
Logic Gate
Integrated Circuits
Integrated Circuits
Published Papers��[1] Ali Adib Arnab, Sheikh Sadia Afrin, F.M. Fahad, Hasan U. Zaman, "A cost effective way to build a web controlled search and CO detector rover," DOI:10.1109/CCWC.2017.7868451 (Received the track Best Paper Award), Proceedings of the 7th IEEE Annual Computing and Communication Workshop and Conference (IEEE CCWC 2017), Las Vegas, USA, 9-11 January, 2017, Publisher: IEEE�[2] Ali Adib Arnab, Sheikh Md. Razibul Hasan Raj, John Schormans, Sultana Jahan Mukta, Nafi Ahmad "Analysis of the Cost of Varying Levels of User Perceived Quality for Internet Access," https://doi.org/10.1007/978-3-030-68154-8_36 , Proceedings of the 3rd International Conference on Intelligent Computing & Optimization – ICO 2020, Hua Hin, Thailand, 22-23 April, 2021, Publisher: Springer