Digital System

and Logic

CSC159 – Computer Organization

Lesson Outcomes

Boolean Algebra AND OR

NOT XOR

Boolean Operations

Logic Gates

Truth Tables

Combinational Logic Circuits

UiTM Terengganu - naza Topic 1: Digital System and Logic 2

Integrated Circuits (ICs)

The building blocks of computers

“An IC is a small chip that can function as an amplifier, oscillator,

timer, microprocessor, or even computer memory. Usually made of

silicon and can hold anywhere from hundreds to millions of

transistors, resistors, and capacitors.”

Designed for specialized functions

Examples: the CPU, bus interface, memory

management unit

Transistors commonly used in digital circuits as

electronic switches which can be either in an "on" or

"off" state

UiTM Terengganu - naza Topic 1: Digital System and Logic 3

Boolean Algebra

The digital computer is based on Boolean algebra

Describes rules that govern constants & variables that can

take on two values (Boolean logic)

Can be represented in many ways:

true or false, on or off, yes or no, 1 or 0, light or dark…

Transistors: means for implementing Boolean algebra

Switches: on/off to represent the 0’s and 1’s of binary digital

circuits

Combined to form logic gates

Boolean logic rules can be described as formulas, or

by a truth table

Specifies the result for all possible combinations of inputs

UiTM Terengganu - naza Topic 1: Digital System and Logic 4

Boolean Operations

3 fundamental operations: AND, OR, NOT …

XOR

Operation Symbol Equation

AND • C=A•B

OR (INCLUSIVE-OR) + C=A+B

NOT ˉ C=Ā

XOR (EXCLUSIVE-OR) ⊕ C=A⊕B

UiTM Terengganu - naza Topic 1: Digital System and Logic 5

AND Operation

The result of an AND operation is TRUE if and

only if both (or all) input operands are TRUE

Truth table:(2-input) 22 = 4 AND gate:

ABC C

000

010

100

111

UiTM Terengganu - naza Topic 1: Digital System and Logic 6

OR Operation

The result of an OR operation is TRUE if the

values of any (one or more) of the input

operands are TRUE

Truth table: OR gate:

ABC C

000

011

101

111

UiTM Terengganu - naza Topic 1: Digital System and Logic 7

NOT Operation

The result of a NOT operation is TRUE if and

only if the single is FALSE

The result is always the opposite state from the input

operand

Truth table:(1-input) NOT gate:

21 = 2

AC

01 A C

10

UiTM Terengganu - naza Topic 1: Digital System and Logic 8

XOR Operation

The result of an XOR operation is TRUE if

either A or B is TRUE but not both

Gives a true output when the number of true

inputs is odd

Truth table: XOR gate:

ABC

000 C

011

101

11 0 9

UiTM Terengganu - naza Topic 1: Digital System and Logic

Truth Table (3-input) 23 = 8

ABC Y

000

001 10

010

011

100

101

110

111

UiTM Terengganu - naza Topic 1: Digital System and Logic

Truth Table (4-input)

UiTM Terengganu - naza Topic 1: Digital System and Logic 11

Combinational Logic Circuits

Combinational Logic Circuits are made up

from basic logic gates that are “combined” or

connected together to produce more

complicated switching circuits.

UiTM Terengganu - naza Topic 1: Digital System and Logic 12