0% found this document useful (0 votes)
7 views32 pages

Chapter 1-1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views32 pages

Chapter 1-1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Computer Organization and

Architecture
COMP 241

Shukri Aden (B.sc Software


engineering)
[email protected]
Chapter one
Introduction to digital logic circuits
• What computers are?
– Computers are programmable digital electronic devices.
• Digital information is presented by variables that
take a limited number of discrete values.
• Discrete values are processed internally by
components that contain a limited number of
discrete states.
– Decimal digits: 0, 1, 2,…..9 → 10 discrete values.
– Binary number: 0, 1 -> 2 discrete values.
• But, in digital systems, these discrete elements of
information are represented by physical quantities called
signals (electrical signals: current and voltage)
• These signals are characterized to have only two discrete
values and are said to be binary .
• Digital computers use the binary number system which
has two digits: 0 and 1.
• In these systems information is represented in in group
of bits.
• By employing several coding methods these group of bits
can be used to represent no only binary numbers but
also other discrete symbols or information: digits, letters
and can be used to develop complete sets of instructions
for performing various types of computations.
• For example : the binary number 1001011
represent a decimal number 75. but when using the
binary code for the letters it represents the letter k.
It is also possible for it to represent a control code
for specifying some decision logic in a particular
digital machine.
• Generally speaking, Computers consist of hierarchical layers
of hardware and software.
– Hardware: All electronic components and electromechanical
devices that comprise the physical entity of device.
– Software: Instructions and data that the computer
manipulates to perform various tasks.
– Program: A sequence of instructions for the computer.
Architecture & Organization

• Architecture is those attributes visible to the programmer- those


attributes that have a direct impact on the execution of a program.
– Or is concerned with the specification of the various functional modules.
–Instruction set, number of bits used for data representation, I/O
mechanisms, addressing techniques.
• Q: How many bits is a “typical” data in a processor?
• A: It depends on the architecture
– 4-bit, 8-bit, 32-bit, etc. (usually powers of 2)
• Organization is how features are implemented
– Is concerned with the way the hardware components operate
and the way they are connected together to give rise to the
computer system. In other words it is to investigate the
organizational structure to verify that the computer parts
operate as intended or expected.
it to mean the underlying implementation of the architecture.
Why study computer organization and
architecture?
– Design better programs, including system software such as
compilers, operating systems, and device drivers.
– Optimize program behavior.
– Evaluate (benchmark) computer system performance.
– Understand time, space, and price tradeoffs.
• Generally: the Principle of Computer Organization
and Architecture answers the question "How do
computers work ?"
• It examines the underlying components and the
basic organizing principles in the construction of
computer systems.
• By studying the fundamental organizing principles
of computer systems, we are better able to
understand, design, and implement complex
systems.
An example of abstraction
• Logic gates
– Binary logic deals with binary variables and with
operations that assumes a logical meaning. It is used to
describe the manipulation of and processing of binary
information.
• Digital Logic Circuits
– electronic circuits that handle information encoded in
binary form (deal with signals that have only two values,
0 and 1).These circuits are called Logic gates.
– These gates are hardware that produce signals of binary
1 or 0 when input logic requirements are satisfied.
– Each gate has a distinct graphical expression and a truth
table to represent the input –output relationship of the
binary variables of each gate in a tabular form.
Truth Tables and Boolean Notation

• Circuits with one input

– Buffer P = A
– The buffer does not A P
A P
produce any particular 0 0
logic function since the 1 1
binary value of the output
is the same as the binary
value of the input

A P
0 1 A P
1 0
– Not P=A
Basic AND / OR
• Circuits with two Inputs

A B P
0 0 0
– AND P = A.B 0 1 0 A P
1 0 0 B
1 1 1

A B P
0 0 0 A
– OR P=A+B 0 1 1 P
B
1 0 1
1 1 1
Basic NAND / NOR

– NAND P = A.B

A B P
0 0 1 A P
0
1
1
0
1
1
B
– NOR P=A+B 1 1 0

A B P
0 0 1
0 1 0
A
P
1 0 0
B
1 1 0
Basic XOR (Exclusive OR) / XNOR
(Exclusive NOR)
• Circuits with two Inputs:
A B P
– XOR P = A  B 0
0
0
1
0
1
A
1 0 1 P
B
1 1 0

A B P
0 0 1 A
0 1 0 P
– XNOR P = A  B 1 0 0
B
1 1 1
• You should be aware that

not A and not B


A. B A B A.B
0 0 1
and 0 1 0
1 0 0
not (A and B) equivalent to NAND A. B 1 1 0

are different.
• Gates can have multiple inputs and more than one output.
– A second output can be provided for the complement of the
operation.

• Any logic circuits can be built from the three basic


building blocks: OR, AND, NOT
– Example 1: x = A B + C
– Example 2: x = (A+B)C
Examples 1,2
Boolean Algebra
• Boolean Algebra is used as a formal mathematical
tool that deals with binary variables and logic
operations.
• Boolean expressions are created by performing operations
on Boolean variables.

• A Boolean function has:


• At least one Boolean variable,
• At least one Boolean operator, and
• At least one input from the set {0,1}.
• It produces an output that is also a member of the set {0,1}.
• And can be expressed using a truth table and
diagrammatically using logic gates.
• The truth table for the Boolean
function: 3.2 Boolean Algebra

is shown at the right.


• To make evaluation of the
Boolean function easier, the
truth table contains extra
(shaded) columns to hold
evaluations of subparts of the
function.

21
• Digital computers contain circuits that implement Boolean
functions. 3.2 Boolean Algebra
• Hence the simpler that we can make a Boolean function, the
smaller the circuit that will result.
– Simpler circuits are cheaper to build, consume less power, and run faster than
complex circuits.
• With this in mind, we always want to reduce our Boolean
functions to their simplest form.
• Generally- the purpose of Boolean algebra is to facilitate the
analysis and design of digital circuits. It provides a convenient
tool to:
– Express in algebraic form a truth table relationship between binary
variables.
– Express in algebraic from the input –output relationship of logic
diagrams.
– Find simple circuit for the same function.
• There are a number of Boolean identities\rules that help us to
do this. 22
The most basic identities of the Boolean
Algebra
1) X.0 =0 null law
2) X. 1 =X identity law
3) X.X=X idempotent law
4) X.X’=0 inverse law
5) x+0=x identity law
6) x+1=1 null law
7) x+x=x idempotent law
8) x+x’=1 inverse law
9) (X’)’ = X double
complement law
Boolean Theorems (Multivariable)
1) x+y = y+x
2) X.Y = Y.X
3) x+(y+z) = (x+y)+z=x+y+z
4) x(yz)=(xy)z=xyz
5) x(y+z)=xy+xz
6) (w+x)(y+z)=wy+xy+wz+xz
DeMorgan’s Theorems
• (x+y)’=x’y’
• Implications and alternative symbol for NOR
function. Figure (b) is the alternative of the NOR
gate.
(xy)’=x’+y’
Implications and alternative symbol for NAND
function. Figure (b) is the alternative of the NAND
gate.
• Simplify
3.2 Boolean Algebra

27
Another example
• F= ABC + ABC’ +A’C
=AB(C + C’) + A’C
= AB + A’C
Complement of a function
• Sometimes it is more economical to build a circuit using
the complement of a function (and complementing its
result) than it is to implement the function directly.
• DeMorgan’s law provides an easy way of finding the
complement of a Boolean function.
• Recall DeMorgan’s law states:

29
• DeMorgan’s law can be extended to any number of
variables.
• Replace each variable by its complement and change all
ANDs to ORs and all ORs to ANDs.
• Thus, the complement of:

can be:

30
• Through our exercises in simplifying Boolean expressions, we
see that there are numerous ways of stating the same Boolean
expression.
– These “synonymous” forms are logically equivalent.
– Logically equivalent expressions have identical truth tables.
• In order to eliminate as much confusion as possible, designers
express Boolean functions in standardized or canonical form.
• There are two canonical forms for Boolean expressions:
• sum-of-products and product-of-sums.
• In the sum-of-products form, ANDed variables are ORed
together.
– For example:
• In the product-of-sums form, ORed variables are ANDed
together:
– For example: 31
• It is easy to convert a function to sum-
of-products form using its truth table.
• From the truth table locate the values
of the variables that make the function
true (=1).
• Then list the values of the variables
that result in a true function value
• Each group of variables is then ORed
together.
• Hence, the sum-of-products form for our
function is:

• note that this function is not in simplest


terms. Our aim is only to rewrite our
function in canonical sum-of-products
form. 32
END OF CHAPTER ONE

You might also like