Digital Computers & Digital Systems

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

I.

INTRODUCTION - DIGITAL COMPUTERS & DIGITAL SYSTEMS

Digital Computers
- follows a sequence of instruction called programs that operates on a given data.
- used in scientific calculations, educational field, commercial and business data processing,
air traffic control and space guidance.

Digital Systems
- it manipulates discrete elements of information like electric impulses, decimal digits, letters
of the alphabets, arithmetic operators, punctuation marks or any other meaningful symbols.
- it has precise interpretation
- examples are general purpose digital computers, telephone switching exchange, digital
voltmeter, digital counters, electronic calculator and digital displays.

Analog Systems
- performs a direct simulation of a physical system.
- the variables in analog systems are represented by continuous signals usually electric
voltages that vary with time.
- the output is ambiguous and approximate.

NUMBER SYSTEM

Base/Radix – signifies the number of digits available in a number system.

Note: The largest digit available in a number system is one less than its base.

Binary and Decimal Number System

Binary Number System


- has a base of 2.
- digits are 0, 1
- a series of 1’s and 0’s
Decimal Number System
- has a base of 10.
- digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- the number system used by human beings for counting

Octal and Hexadecimal Number System

Octal Number System


- has a base of 8
- digits are 0, 1, 2, 3, 4, 5, 6, 7
- each digit is composed of 3 bits
Hexadecimal Number System
- has a base of 16
- digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
- each digits is composed of a nibble

Bits – 0’s and 1’s Word – 16 bits


Byte – 8 bits Nibble – 4 bits
NUMBER BASE CONVERSION
Rules:
Conversion from BINARY to OCTAL
1. Divide the binary no. into 3 bits/grouped from Least Significant Bit (LSB) to Most Significant
Bit (MSB).
2. Convert the binary groups into its equivalent digit.

Conversion from BINARY to HEXADECIMAL

1. Divide the binary no. into 4 bits/grouped from LSB to MSB.


2. Convert the binary group into its equivalent hexadecimal digit.

Base10 Base2 Base3 Base8 Base16


0 0 0 0 0
1 1 1 1 1
2 10 2 2 2
3 11 10 3 3
4 100 11 4 4
5 101 12 5 5
6 110 20 6 6
7 111 21 7 7
8 1000 22 10 8
9 1001 100 11 9
10 1010 101 12 A
11 1011 102 13 B
12 1100 110 14 C
13 1101 111 15 D
14 1100 112 16 E
15 1111 120 17 F

COMPLEMENTS - used in digital computers for simplifying the subtraction operation and for
logical manipulation.

2 Types of Complements

1. Diminished Radix Complement


- base – 1 complement

Binary
1’s Complement
 the 1’s complement of the binary number is the opposite of each bit. 1 becomes 0, 0
becomes 1. Ex. 101012 = 01010(1’s)
Decimal
- 9’s Complement
- subtract each digit of a decimal number by 9.
Ex. 12345 = 99999-12345 = 87654 (9’s)

2. Radix Complements
- base complement
Binary
- 2’s Complement
- get first the 1’s complement of the binary number and add 1 to get the 2’s complement. Ex.
101012 = 01010(1’s) + 1 = 01011(2’s)
2
Decimal
 10’s Complement
o get first the 9’s complement of the decimal number and add 1 to get the 10’s
complement.
o Ex. 12345 = 99999-12345 = 87654(9’s) +1 = 87655(10’s)

BINARY CODED NUMBERS


In digital electronics, it is common to represent numbers in terms of codes. These code
functions for a variety of reasons, some for error detection, some for ease in the use in electronic
circuits and some to represent alphanumeric symbols in series of 1’s and 0’s.

Binary Coded Decimal (BCD)


- it is used to convert decimal into its convenient binary form. To convert decimal into
BCD, it is necessary to use 4 bits.

Excess 3 Code (+3)


- it is derived in the same way as BCD except that before conversion, the decimal is
increased by 3.
Gray Code/ Unit Distance
- it is coded no. in which 1 and only 1 bit changes in successive numbers. It is also called
the Unit Distance and used in K-mapping.

Conversion from Binary to Gray Code


1. The first bit of the gray code is the same as the 1st bit of the binary nos.
2. The next gray bit is equivalent to the “Exclusive OR” of the first and 2nd binary bits. That is,
it will be a 0 if they are the same and a 1 if they are different.

Conversion from Gray Code to Binary


1. The 1st binary bit is the same as the first gray bit.
2. If the next gray bit is 0, the next binary bit will be the same as the first binary bit. If the next
gray bit is a 1, the next binary bit will be the inverse of the previous binary bit.

Examples:

BCD
1. 108 = 0001 0000 1000 BCD
2. 963 = 1001 0110 0011 BCD

Excess 3 code (+3)


3. 108 = 0100 0011 1011+3
4. 963 = 1100 1001 0110+3

Binary to Gray Code


5. 11001012 = 1010111GC
6. 10101112 = 1111100GC

Gray Code to Binary


7. 1010111GC = 11001012
8. 1100101GC = 10001102

3
LOGIC (BOOLEAN) FUNCTIONS

DIGITAL LOGIC GATES (BASIC, UNIVERSAL, EXCLUSIVE LOGIC GATES)

Boolean algebra differs in a major way from ordinary algebra in that Boolean constants and
variables are allowed to have only two possible values, 0 or 1.

Boolean 0 and 1 do not represent actual numbers but instead represent the state of a
voltage variable, or what is called its logic level.

Some common representation of 0 and 1 is shown in the following diagram.

Logic 0 Logic 1
False True
Off On
Low High
No Yes
Open Switch Close Switch

Truth Table
- means for describing how a logic circuit's output depends on the logic levels present at
the circuit's inputs.
- the tabular enumerations of the possible inputs and their corresponding outputs.

BASIC LOGIC OPERATION

OR OPERATION
The expression X = A + B reads as "X equals A OR B". The + sign stands
for the OR operation, not for ordinary addition. The OR operation produces a result of 1 when any
of the input variable is 1. The OR operation produces a result of 0 only when all the input variables
are 0.

An example of three input OR gate and its truth table is as follows:


With the OR operation, 1 + 1 = 1, 1+ 1 + 1 = 1 and so on.

4
AND OPERATION
The expression X = A * B reads as "X equals A AND B". The multiplication sign stands for
the AND operation, same for ordinary multiplication of 1s and 0s. The AND operation produces a
result of 1 occurs only for the single case when all of the input variables are 1. The output is 0 for
any case where one or more inputs are 0

An example of three input AND gate and its truth table is as follows:
With the AND operation, 1*1 = 1, 1*1*1 = 1 and so on.

NOT OPERATION
The NOT operation is unlike the OR and AND operations in that it can be performed on a
single input variable. For example, if the variable A is subjected to the NOT operation, the result x
can be expressed as x = A' where the prime (') represents the NOT operation. This expression is
read as:
x equals NOT A
x equals the inverse of A
x equals the complement of A
Each of these is in common usage and all indicate that the logic value of
x = A' is opposite to the logic value of A.
The truth table of the NOT operation is as follows:

1' = 0 because NOT 1 is 0


0' = 1 because NOT 0 is 1
The NOT operation is also referred to as inversion or complementation, and these terms
are used interchangeably.

UNIVERSAL LOGIC OPERATION

NOR OPERATION
NOR and NAND gates are used extensively in digital circuitry. These gates combine the
basic operations AND, OR and NOT, which make it relatively easy to describe then using Boolean
Algebra.
5
NOR is the same as the OR gate symbol except that it has a small circle on the output. This
small circle represents the inversion operation. Therefore the output expression of the two input
NOR gate is:
X = ( A + B )'

An example of three input OR gate can be constructed by a NOR gate plus a NOT gate:

NAND OPERATION
NAND is the same as the AND gate symbol except that it has a small circle on the output.
This small circle represents the inversion operation. Therefore the output expression of the two
input NAND gate is:
X = (AB)'

NAND & NOR Gates Implementation


It is possible to implement any logic expression using only NAND gates and no other type
of gate. This is because NAND gates, in the proper combination, can be used to perform each of
the Boolean operations OR, AND, and INVERT.

6
In a similar manner, it can be shown that NOR gates can be arranged to implement any of
the Boolean operations.

ALTERNATIVE LOGIC GATE REPRESENTATIONS

The left side of the illustration shows the standard symbol for each logic gate, and the right
side shows the alternate symbol. The alternate symbol for each gate is obtained from the
standard symbol by doing the following:

1. Invert each input and output of the standard symbol. This is done by adding bubbles (small
circles) on input and output lines that do not have bubbles, and by removing bubbles that are
already there.
2. Change the operation symbol from AND to OR, or from OR to AND. (In the special case of the
INVERTER, the operation symbol is not changed.)

Several points should be stressed regarding the logic symbol equivalences:


1. The equivalences are valid for gates with any number of inputs.
2. None of the standard symbols have bubbles on their inputs, and all the alternate symbols do.
3. The standard and alternate symbols for each gate represent the same physical circuit: there is
no difference in the circuits represented by the two symbols.
4. NAND and NOR gates are inverting gates, and so both the standard and alternate symbols for
each will have a bubble on either the input or the output. AND and OR gates are non-inverting
gates, and so the alternate symbols for each will have bubbles on both inputs and output.

XOR Functions
x XOR y = x y ‘ + x ‘ y
(x XOR y) ‘ = xy + x ‘ y’

7
Explanation:
(x XOR y) ‘ = (x y’ + x ‘ y) ‘
= (x ‘ + y) (x + y ‘)

Using distributive property


= xy + x ‘ y’

XOR identities:
x XOR 0 = X x XOR 1 = x’
x XOR x = 0 x XOR x’ = 1
x XOR y ‘ = (x XOR y) ‘ x’ XOR y = (x XOR y) ‘

Commutative law: A XOR B = B XOR A


Associative law : (A XOR B) XOR C = A XOR (B XOR C) = A XOR B XOR C

Implementations of XOR gate


NOR and NAND gates

Assignment:

Give Truth Table


for each
implementation

F= (xy’ + x’y)’

AND-OR-NOT gates ( F= (xy’ + x’y )


NAND gates (F = ((x y ’)’ (x’ y)’)’

BOOLEAN FUNCTIONS
Boolean functions is an expressions formed with binary variables, the two binary operators,
OR & AND and unary operator NOT, parenthesis and an EQUAL sign.
Ex. F1 = xyz’
F1 is equal to 1 when x, y and z’ = 1.
Boolean functions can be expressed in terms of truth table
Ex.2n = number of combinations, where n = number of variables.

x y z F1 F2 F3 F4
0 0 0 0 0 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 1 1
1 0 0 0 1 1 1
1 0 1 0 1 1 1
1 1 0 1 1 0 0
1 1 1 0 1 0 0
Literal – primed or un-primed variables.

Minimization of Boolean functions means less equipment.


8
Investigating the various Boolean theorems (rules) can help us to simplify logic expressions and
logic circuits.

Complement of a Function
Rules:
1. Interchange the OR to AND, and AND to OR.
2. Complement of each literal.

BOOLEAN ALGEBRA

Basic Theorems
Investigating the various Boolean theorems (rules) can help us to simplify logic expressions and
logic circuits.

Multivariable Theorems
The theorems presented below involve more than one variable:

(9) x + y = y + x (commutative law)


(10) x * y = y * x (commutative law)
(11) x+ (y+z) = (x+y) +z = x+y+z (associative law)
(12) x (yz) = (xy) z = xyz (associative law)
(13a) x (y+z) = xy + xz
(13b) (w+x)(y+z) = wy + xy + wz + xz
(14) x + xy = x
(15) x + x'y = x + y

Proof of (14)
x + xy = x (1+y)
= x * 1 [using theorem (6)]
= x [using theorem (2)]
9
De Morgan's Theorem
De Morgan's theorems are extremely useful in simplifying expressions in which a product or sum
of variables is inverted. The two theorems are:
(16) (x+y)' = x' * y'
(17) (x*y)' = x' + y'
Theorem (16) says that when the OR sum of two variables is inverted, this is the same as inverting
each variable individually and then ANDing these inverted variables.

Theorem (17) says that when the AND product of two variables is inverted, this is the same as
inverting each variable individually and then ORing them.

Example
X = [(A'+C) * (B+D')]'
= (A'+C)' + (B+D')' [by theorem (17)]
= (A''*C') + (B'+D'') [by theorem (16)]
= AC' + B'D

Three Variables DeMorgan's Theorem


(18) (x+y+z)' = x' * y' * z'
(19) (xyz)' = x' + y' + z'

Implications of DeMorgan's Theorem

For (16): (x+y)' = x' * y' For (17): (x*y)' = x' + y'

01
THEOREMS – During the analysis or synthesis of logic cicuits, we often write algebraic
expressions that characterize a circuit’s actual or desired behaviour. Switching-algebra theorems
are statements known to be always true, that allow us to manipulate algebraic expression to allow
simplier analysis or more efficient synthesis of corresponding circuits.

ONE-VARIABLE THEOREMS
Identities (T1) x+0=x (T1’) x.1=x
Null elements (T2) x+1=1 (T2’) x.0=0
Idempotency (T3) x+x=x (T3’) x.x=x
Involution (T4) (x’)’=x
Complement (T5) x+x’=1 (T5’) x.x’=0

TWO- AND THREE-VARIABLE THEOREMS


Commutativity (T6) x+y = y+x (T6’) x.y = y.x
Associativity (T7) (x+y)+z = x+(y+z) (T7’) (x.y).z = x.(y.z)
Distributivity (T8) xy + xz = x(y+z) (T8’) (x+y) (x+z) = x+yz
Covering (T9) x+xy = x (T9’) x(x+y) = x
Combining (T10) xy +xy’ = x (T10’) (x+y) (x+y’) = x
Consensus (T11) xy+x’z+yz = xy+x’z (T11’) (x+y)(x’+z)(y+z)=(x+y)(x’+z)
DeMorgan’s (T12) x+y = x’.y’. (T12’) x.y = x’+y’

Sample problems:

Prove the following equations:


1. x+x’y = x+y
2. x+xy = x
3. x’yz+x’yz’+xz = x’y+xz
4. xy+x’z+yz = xy + x’z
5. (A+B)(A+C) = AC + A’B
6. A’B + B’C’ + AB + B’C = 1

Simplify the following equations:


Using Complementations (De Morgan’s)
7. F1= x’yz’ +x’y’z
8. F2 = x(y’z’+yz)
9. x’y’ + x’y + xy
10. x’y’ + y’z + xz + xy + yz’
11. x’y’ + xyz + x’y
12. x + y(z+x’z’)
13. w’x(z’+y’z) + x(w+w’yz)

00

You might also like