Fundamentals of Digital Computers: Unit - I
Fundamentals of Digital Computers: Unit - I
Fundamentals of Digital Computers: Unit - I
UNIT – I
1.1 DIGITAL PRINCIPLES
Digital principles are the basis for all digital electronic system, and they along
with a no. of applications are intended to provide the background to succeed in the
modern world of digital electronics.
1.1.1 Definitions for Digital Signals
Electronic circuits and systems can be divided into two categories generally
referred to as
Analog and
Digital
1.1.2 Analog
Analog circuits, designed for use with small signals, can be made to work in a
linear fashion.
An analog signal is further classified into simple and composite signals. A
simple analog signal is a sine wave that cannot be decomposed further. On the other
hand, a composite analog signal can be further decomposed into multiple sine waves.
The range of an anlaog signal is not fixed. An analog signal transmits data in the
form of wave. The best example of an analog signal is a human voice.
1.1.3 Digital
Digital circuits are generally used with large signals and are considered
nonlinear.
Digital signal represents a noncontiguous wave that carries information in a
binary format and has discrete values. The output signal is simply on or off.
Page 1
FUNDAMENTALS OF DIGITAL COMPUTERS
The range of the digital signal is finite and ranges between 0 to 1. Digital signal
transmits the data in the binary form i.e. in the form of bits. The best example of a
digital signal is the transmission of data in a computer
1.1.4 Binary system
A digital electronic circuit (Or) system has only two states said to be binary (Bi
means two).
The binary number system has exactly two signals “0” & “1”.
The binary number is widely used in digital electronics.
The operations of electronic circuit can be described in terms of its voltage levels.
There are two types of voltage levels.
High voltage (H)
Low voltage (L)
This can be represented in binary number system as L = 0 & H = 1 and TRUE for
High and FALSE for low in logical operations.
Here, H = 1 = T and L = 0 = F is called positive logic and H = 0 = F and L = 1 = T
is called negative logic.
The majority of digital circuit families utilize a single +5Vdc power supply and
two voltage levels are +5Vdc and 0Vdc.
Page 2
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 3
FUNDAMENTALS OF DIGITAL COMPUTERS
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 8
9 1001 9
10 1010 A
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F
Page 4
FUNDAMENTALS OF DIGITAL COMPUTERS
The number system which uses a base of 2 is called the binary number system.
Binary number system has 2 digits i.e., 0 and 1.
It is also called base 2 number system.
Binary Conversions:
Binary to octal : Simply group the binary digits into groups of 3.
Binary to Decimal : Multiplying powers of 2.
Binary to Hexadecimal : Simply group the binary digits into groups of 4.
Examples of Binary to octal:
1. (111110111)2 = ?8
111 110 111
7 6 7
Ans: (111110111)2 = (767)8
2. (10110111.10011)2 = ?8
010 110 111 . 100 110
2 6 7 4 6
Ans: (10110111.10011)2 = (267.46)8
Page 5
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 6
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 8
FUNDAMENTALS OF DIGITAL COMPUTERS
2 = 010
1 = 001 Ans: (7521)8 = (111101010001)2
2. (623.54)8 = ?2
6 = 110
2 = 010
3 = 011
5 = 101
4 = 100 Ans: (623.54)8 = (110010011.101100)2
3. (12.3)8 = ?2
1 = 001
2 = 010
3 = 011 Ans: (12.3)8 = (001010.011)2
5. (117)8 = ?2
1 = 001
1 = 001
7 = 111 Ans: (117)8 = (001001111)2
Page 9
FUNDAMENTALS OF DIGITAL COMPUTERS
= 0.125 + 0.078
= 0.203
Ans: (0.150)8 = (0.203)10
5. Convert (1452)8 to the decimal system
(1452)8 = 1x83+4x82 +5x81 +2x80
= 512 +4x64+5x8 +2x1
= 512 +256 + 40 + 2
= 810
Ans: (1452)8 = (810)10
2. (371.145)8 = ?16
Convert using 421 code
371.145 = 011 111 001 . 001 100 101
Next convert it to 8421 code
0000 1111 1001 . 0011 0010 1000
0 F 9 3 2 8
Ans: (371.145)8 = (F9.328)16
3. (011)8 = ?16
Convert using 421 code
011 = 000 001 001
Next convert it to 8421 code
Page 11
FUNDAMENTALS OF DIGITAL COMPUTERS
2. (15.75)10 = ?2
Page 12
FUNDAMENTALS OF DIGITAL COMPUTERS
5. (60)10 = ?2
Page 13
FUNDAMENTALS OF DIGITAL COMPUTERS
4. (168)10 = ?8
Page 14
FUNDAMENTALS OF DIGITAL COMPUTERS
2. (1D4)16 = ?8
Convert to 8421 code
1D4= 0001 1101 0100
Convert to 421 code
000 111 010 100
0 7 2 4
Ans :(1D4)16 = (0724)8
3. (D53.4)16 = ?8
Convert to 8421 code
D53.4= 1101 0101 0011. 0100
Convert to 421 code
110 101 010 011. 010 000
6 5 2 3 2 0
Ans :(D53.4)16 = (6523.20)8
Examples of Hexadecimal to Decimal
1. (DF3)16 = ?10
Page 17
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 18
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 19
FUNDAMENTALS OF DIGITAL COMPUTERS
This problem can be more prominent if the object moves from zone-3 (ABC =
011) to zone-4 (ABC= 100) when all three sensors has to change its value.
If zones are gray coded such problem does not appear as between two
consecutive zones only one sensor changes its value.
The disadvantage with gray code is that it is not good for arithmetic operation.
For comparing truth tables of binary coded numbers and gray coded numbers we can
design binary to gray converter and gray to binary converter.
Gray code
Page 20
FUNDAMENTALS OF DIGITAL COMPUTERS
To obtain a different reflected code, one can start with any bit combination and
proceed to obtain the next bit combination by changing only one bit from 0 to 1 or 1 to 0
in any desired random fashion.
1.2.7 EXCESS-3 CODE
To overcome the disadvantage of BCD in forming complements, other systems
like Excess-3 codes are used.
This code is formed by adding 3 to the decimal number and then forming the
binary coded number.
For example,
To form the excess-3 representation of 5, first 3 is added to 5 yielding 8 and
normal BCD is used which is 1000.
Similarly, the decimal number 0, 1, 2 coded in Excess-3 will be 0011, 0100, 0101.
Page 21
FUNDAMENTALS OF DIGITAL COMPUTERS
ASCII-8 CODE
A new version of ASCII is the ASCII-8 code which is an 8-bit code, with 8-bits the
code capacity is extended to 256 characters.
Page 22
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 23