0% found this document useful (0 votes)
111 views

Computer Fundamentals and Logic Circuits Part 2 Updated

The document discusses the main components of a computer system including the central processing unit (CPU), memory, and other miscellaneous parts. It provides details on the CPU, describing its control unit, arithmetic logic unit, and how it executes program instructions. It also covers different types of memory like ROM, RAM, and cache. Finally, it briefly discusses the motherboard, power supply, modems, and number systems including binary, decimal, and hexadecimal.
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)
111 views

Computer Fundamentals and Logic Circuits Part 2 Updated

The document discusses the main components of a computer system including the central processing unit (CPU), memory, and other miscellaneous parts. It provides details on the CPU, describing its control unit, arithmetic logic unit, and how it executes program instructions. It also covers different types of memory like ROM, RAM, and cache. Finally, it briefly discusses the motherboard, power supply, modems, and number systems including binary, decimal, and hexadecimal.
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/ 58

Parts of the Computer System

c. Central Processing Unit (CPU)


• Control center that converts data input to information input
• Highly complex, extensive sets of electronic circuitry that executes stored program
instructions
• Communicates with the I/O devices and storage devices like the primary and the
secondary storage
• A microprocessor on a chip is called logic chip
• Main parts includes the Control Unit and the Arithmetic Logic Unit

TOP BOTTOM (pins)

CPU CHIP
Main Parts of the CPU
Control Unit
• Contains circuitry that uses electrical signals to direct the entire computer system
to carry out, or execute, stored program instructions
• Communicate with both the Arithmetic Logic Unit and the memory
Arithmetic Logic Unit
• Contains circuitry that executes arithmetic and logical operations
• Mathematically, it can perform addition, subtraction, multiplication, and division
• Logically, it is used in comparison
• The computer can take an action based on the results of the comparison

How CPU Executes Program Instructions


1. The control unit fetches (gets) the instruction from
memory
2. The control unit decodes the instruction (decides what
it means ) and directs the necessary data be moved
from memory to ALU. These first 2 steps are called
instruction time, I-time
3. The ALU executes the arithmetic or logical instruction
4. ALU stores the result of this operation in memory or in a
register. Step 3 and 4 are called execution time, E-time
Parts of the Computer System
d. Memory
• Part of the computer that holds data and instructions for
processing
Read Only Memory (ROM)
• Permanent memory
• Stores some operating system software of the computer
1. Basic Input Output System (BIOS)
• Only software built in to the computer system
• Provides control to all devices that require services of
microprocessors
2. Complementary Metal Oxide Semiconductor (CMOS)
• Where the various parameters needed by the BIOS to perform its
tasked are permanently saved
3. Chipset
• Enables a set of instructions so the CPU can communicate with other
parts of the motherboard
Random Access Memory (RAM)
Working storage of the computer system
Volatile Memory

Cache
Relatively small amount of very fast memory that stores data and
instructions that are used frequently resulting in an improved
processing speed
Parts of the Computer System
e. Miscellaneous Parts
Motherboard
• The main board of the computer
• Manage all transactions of data between CPU and
peripherals
• Houses the CPU and the second level cache, the chipset,
the BIOS, main memory, I/O chips, ports for the keyboard,
serial I/O, parallel I/O, disks and plug-in cards
Power Supply
• Convert High Voltage AC to a lower DC voltage to power
up the computer’s electronic components
• +5V supplies electronic circuits on motherboards, adaptor
cards and peripheral devices
• +12V is used mainly to power motors of disk device
systems such as hard disk, CD-ROM and floppy disk drive
Modems
• Allows transfer if data over standard telephone wires
with other computer users
Parts of the Computer System

Computer’s Back Panel


Number Systems
Generalizations:
1. There is no number system with a base of 1
2. The no. of symbols in any number system is the radix (base)
3. The highest symbol in any number system is equal to radix -1
4. The highest symbol plus 1 equals 0 with carry 1

Decimal System Ex: 7392


- said to be of base 10 because it uses 10 digits and
the coefficients are multiplied by powers of 10

Ex: 11010.11 Binary System


- 2 possible values 0 and 1

In general, a number expressed in base r system Ex: (4021.2)5


has coefficients multiplied by powers of r
Ex: B65F16
Addition, Subtraction and Multiplication
of Binary Numbers
Addition
101101 Augend 1010100
100111 Addend

Subtraction

101101 Minuend 000000


100111 Subtrahend

Multiplication

1011 Multiplicand
101 Multiplier 110111
Number Base Conversion
A number expressed in base r can be converted to its decimal
equivalent by multiplying each coefficient with the corresponding
power of r and adding
Examples
1010.011 to decimal

630.4 (base 8) to decimal


Number Base Conversion
The conversion from decimal to binary or to any other base r system
is more convenient if the number is separated into an integer part
and a fraction part and the conversion of each part done separately.
Examples
Decimal 41 to binary

Decimal 153 to octal


Number Base Conversion
Conversion of a Decimal fraction to base r
- multiplication is by r and the coefficients found from the integers may
range in value from 0 to r-1.
Examples
Decimal 0.6875 to binary

Decimal 0.513 to octal


Number Base Conversion
Octal and Hexadecimal Numbers

Binary to Octal
010 110 001 101 011 111 100 000 110

Binary to Hexadecimal
0010 1100 0110 1011 1111 0010
Complements
- used in digital computers for simplifying the subtraction
operations and for logical manipulations

2 Types Binary Decimal


R’s complement 2’s 10’s
(R-1)’s complement 1’s 9’s

The 10’s complement of a decimal number can be formed by leaving


all least significant zeroes unchanged, subtracting the 1st non-zero
least significant digit from 10 and then subtracting all other higher
significant digits from 9.

Examples:
a. 0.3267
b. 25.639
Complements
The 9’s complement of a decimal number can be formed simply
by subtracting every digit from 9.

Examples:
a. 0.3267
b. 25.639
Complements
The 2’s complement can be formed by leaving all least significant
zeroes and the 1st non-zero unchanged and then replacing 1’s by
0’s and 0’s by 1’s in all other higher significant digits.

Examples:
a. 101100
b. 0.0110

The 1’s complement of a binary number is even simpler:


1’s are changed to 0’s and 0’s to 1’s.

Examples:
a. 101100
b. 0.0110
Number Systems
Binary Codes

Bit - binary digit


- to represent a group of 2n distinct elements in a binary code requires a
minimum of n bits
- it is possible to arrange n bits in 2n distinct ways
N=2 2 n = 22 = 4 00,01,10,11

Decimal Codes

BCD - Binary Coded Decimal


- a straight assignment of the binary equivalent
- it is possible to arrange n bits in 2n distinct ways
- difference between conversion of a decimal number to binary and the
binary coding of a decimal number

Ex. 13 BCD 0001 0011

Binary 1101
Decimal Digit BCD Excess 3

0 0000 0011

1 0001 0100

2 0010 1010

3 0011 0110

4 0100 0111

5 0101 1000

6 0110 1011

7 0111 1010

8 1000 1011

9 1001 1100
Error Detection Codes
Parity Bit – an extra bit included with a message
to make the total no. of 1’s either odd or even
Ex: 0111odd P = 0
even P = 1

Reflected Code – Gray Code


- a number in the reflected code changes by
only one bit as its provides from one number to
the next

Alphanumeric Codes
- binary code of a group of elements
consisting of the 10 decimal digits, the 26
letters of the alphabet and a certain number
of special symbol such as $
Number Systems
ASCII – American Standard Code for Information Interchange
Number Systems
EBCDIC – Extended Binary Coded Decimal Interchange Code
Binary Logic
- Deals with variables that take on two discrete
values and with operations that assume logical
meaning.
- consists of binary variables and logical operations.

Positive Logic – 1 stands for the more positive of 2 voltage levels

Negative Logic – 1 stands for the more negative of 2 voltage


levels.
Basic Logical Operations
1. AND (Intersection)
- represented by a dot or by the absence of an operator
x.y = z or xy = Z
x AND y is equal to z

- a logic circuit where output is high only when all inputs are
high
- interpreted to mean that z=1 if and only if x = 1 and y = 1
otherwise z = 0

Truth Table - a table that shows all input and output possibilities for a

logic circuit
X Y Z
0 0 0
0 1 0
1 0 0
1 1 1
Basic Logical Operations
2. OR (Union)
- represented by a plus sign
x+y=z
x OR y is equal to Z

- a logic circuit with 2 or more inputs and only one output. 1 or


more high inputs produce a high output

Z = 1 if X = 1 or if Y = 1 or if both X = 1 and Y = 1. If both X = 1, Y

= 0 then Z = 0
X Y Z
0 0 0
0 1 1
1 0 1
1 1 1
Basic Logical Operations
3. NOT (Inversion)
- represented by a prime (sometimes by a bar)
X’ = Z ( or X = Z )
“X NOT is equal to Z”

- a gate with only 1 input and 1 output (Complement)

if: X = 1 then Z = 0
X = 0 then Z = 1

X Z
0 1
1 0
Logic Gates
• Electronic Digital Circuits
• Logic Circuits
• Block of hardware that produces a
Logic 1 or Logic 0 output signal if input
logic requirements are satisfied
• Digital Circuits
• Switching Circuits
Other Logic Operations
1. NOR Function
- complement of the OR function and its name is an abbreviation
of Not-OR
- all inputs be low to get a high output

X Y F
0 0 1
0 1 0
1 0 0
1 1 0
2. NAND Function
- complement of AND
- abbreviation of Not-AND
X Y F
0 0 1
0 1 1
1 0 1
1 1 0
Other Logic Operations
3. Exclusive OR (XOR or EOR)
- similar to OR but excludes the combination of both X and Y
equal to 1

X Y F
0 0 0
0 1 1
1 0 1
1 1 0
4. Equivalence or Exclusive NOR or Exclusive OR-Not
- a function that is 1 when the 2 binary variables are equal i.e.
when both are o or both are 1.
X Y F
0 0 1
0 1 0
1 0 0
1 1 1
Other Logic Operations
5. Buffer
- produces a transfer function but does not produce any
particular logic operation since the binary value of the output is equal
to the binary value of the input

X F
0 0
1 1

NOR NAND

XOR XNOR
Boolean Algebra ( Symbolic Logic)
- A set of elements, a set of operators and a number of unproved
axioms or postulates

History of Boolean Algebra

1854- George Boole


introduced a systematic treatment
of logic and developed for this purpose
an algebraic system
1938 – C.E Shannon
introduced a 2-valued Boolean
Algebra, in which he demonstrated that
the properties of bistable electrical
switching circuits can be represented by
this algebra
Basic Theorems and Principles
of Boolean Algebra
Duality Principle

Every algebraic expression deducible from


the postulates of Boolean Algebra
remains valid if its operators and
identity elements are interchanged

If the dual of an algebraic expression is


desired, we simply interchange OR and
AND operators and replace 1’s by 0’s
and 0’s by 1’s
Postulates and Theorems of
Boolean Algebra
1. X + 0 = x ;X.1=X

2. X + X’ = 1 ; X . X’ = 0

3. X + X = X ;X.X=X

4. X + 1 = 1 ;X.0=0

5. (X’)’ = X Involution

6. X + Y = Y + X ; XY = YX Commutative

7. X + (Y + Z) = (X + Y) + Z ; X(YZ) = (XY)Z Associative

8. X (Y + Z) = XY + YZ ; X + YZ = (X + Y) (X + Z) Distributive

9. (X + Y)’ = X’Y’ ; (XY)’ = X’ + Y’ De Morgan’s

10. X + XY = X ; X (X + Y) = X Absorption
Boolean Algebra

Operator Precedence
1. Parentheses
2. NOT
3. AND
4. OR

Examples

1. X + X’Y
2. X (X’ + Y)
3. X’Y’Z + X’YZ + XY’
4. XY + X’Z + YZ
Canonical and Standard Forms
A binary variable may appear either in its normal form (x) or in its
complement form (x’)

Since each variable may appear in either form, there are four
possible combinations

x’y’ x’y xy’ xy

Each of the 4 AND terms represents one of the distinct areas in the
Venn diagram
Minterm or Standard Product
A symbol for each minterm is of the form mj where j denotes the
decimal equivalent of the binary no. of the minterm
designated

In a similar function, n variables form an OR term with each


variable being primed or unprimed, provide 2n possible
combination called Maxterms or Standard Sums

Any Boolean function can be expressed as a


product of maxterms

Boolean functions expressed as a sum of


minterms or product of maxterms are
said to be in canonical form
Variables Minterms Maxterms
X Y Z Term Designation Term Designation

0 0 0 x’y’z’ m0 x+y+z M0

0 0 1 x’y’z m1 x+y+z’ M1

0 1 0 x’yz’ m2 x+y’+z M2

0 1 1 x’yz m3 x+y’+z’ M3

1 0 0 xy’z’ m4 x’+y+z M4

1 0 1 xy’z m5 x’+y+z’ M5

1 1 0 xyz’ m6 x’+y’+z M6

1 1 1 xyz m7 x’+y’+z’ M7
Minterm or Standard Product
f1 = x’y’z + xy’z + xyz
f1 = m1 + m4 + m7

Maxterm or Standard Sum


f1 = (x + y + z) (x + y’ + z ) (x + y’ + z’) (x’ + y + z’) (x’ + y’ + z)
f1 = M0 . M2 . M3 . M5 . M6

Example:
Express the Boolean Function, F = A + B’C as a sum of minterms.

Example:
Express the Boolean Function, F = xy + x’z in a product of
maxterms form
Conversion between Canonical Forms
The complement of a function expressed as the sum of minterms
equals the sum of minterms missing from the original
function.

Ex. F (A, B, C) = ∑ (1, 4, 5, 6, 7)

Ex. F (x,y,z) = ∏ (0, 2, 4, 5)


Standard Forms
2 Types of Standard Forms:
Sum of Products (SOP)
- a Boolean expression containing AND
terms called product terms of one or
more literals each
Ex. F1 = y’ + xy + x’yz’

Product of Sums
- A Boolean expression containing OR
terms call sum terms
Ex. F2 = x(y’+z) (x’ + y + z’ + w)
Simplification of Boolean Functions
Karnaugh Map
Sum of Products (SOP)
- may be regarded as a pictorial form of a truth table or as an extension of the
Venn Diagram
- the map is a diagram made up of squares. Each square represents one
minterm
- any 2 minterms in adjacent squares that are OR together will cause a removal
of the different variable

A 4x4 Karnaugh Map


Simplification of Boolean Functions
Examples: Simply the Boolean functions:

1. F = xy’z + x’yz’ + xy’z’ + xy’z

2. F = x’yz + xy’z’ + xyz + xyz’

3. F = A’C + A’B + AB’C + BC


4-Variable Map

Notes:
1 square represents 1 minterm – 4 literals
2 adjacent squares – 3 literals
4 adjacent squares – 2 literals
8 adjacent squares – 1 literal
16 adjacent squares = 1
A 4x4 Karnaugh Map
Don’t Care Conditions
There are applications where certain
combination of input variables never
occur.

As a result, we don’t care what the


function output is to be for those
combination of the variables because
they are guaranteed to never occur.
However, these can be used on a map to
provide further simplification of the
function. When choosing adjacent
squares to simplify the function in the
map, the x’s may be assumed to be either
0 or 1, which even gives the simplest
expression. An x need not be used at all if
it does not contribute to covering a larger
area
Simplification of Boolean Functions
Examples: Simply the Boolean functions:

1. F (w, x, y, z) = ∑ (1, 3, 7, 11, 15)


and the don’t care conditions
d (w, x, y, z) = ∑ (0, 2, 5)
Characteristics of the Basic Gate
1. Fan-out
- specifies the no. of standard loads that the output of the gate can drive without impairment
of its normal operation
Standard Load- the current flowing in the input of a gate in the same IC family
2. Power Dissipation
- power consumed by the gate which must be available from the power supply
3. Propagation Delay
- the average transition delay time for the signal to propagate from input to output when the
signals change in value
4. Noise Margin
- the limit of a noise voltage which may be present without impairing the proper operation of
the circuit
Combinational Logic Circuits
-consists of logic gates whose outputs at any time are determined
directly from the present combination of inputs without regard to previous
inputs

Half Adder
-2 binary inputs and 2 binary outputs

Input Output Where:


Augend Sum S = x’y + xy’
Addend Carry C = xy

X Y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Combinational Logic Circuits
Full Adder
-a combinational circuit that forms the arithmetic sum of 3 input bits
- consists of 3 inputs and 2 outputs
X Y Z C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Sum: Carry:
S = x’y’z + x’yz’ +xy’z +xyz C = xy + xz + yz
Combinational Logic Circuits
Decoder
- a combinational logic circuit that recognizes the presence of
a specific binary no. or word.
The input is a multibit binary no. and the output is a signal
that indicates the presence of a specific no. of bit combination
- a combinational circuit that converts binary information
from n inputs to a maximum of 2n unique output lines
n to m lines decoders

When m =< 2expn

Encoder
- a digital function that produces a reverse operation from
that of a decoder.
- a combinational logic circuit that accepts one or more
inputs and generates a unique multibit binary output. The
encoder generates a number or code in response to an
input
Combinational Logic Circuits
Multiplexer (data selector circuit)
- an electronic switch that permits any one of a number
of inputs to be chosen and routed to the output
- has 2 or more inputs and a single output
- main function is to control the routing of data from one
place to another

Demultiplexer
- a combinational logic circuit that receives
information on a single line and transmits this
information on one of 2n possible output lines

Sequential Circuits
- employ memory elements (binary cells) in
addition to logic gates
- their outputs are a function of the inputs and
the state of the memory elements
Sequential Circuits
Sequential Circuits
- employ memory elements (binary cells) in
addition to logic gates
- their outputs are a function of the inputs and
the state of the memory elements

Synchronous Sequential Circuit


- a system whose behavior can be defined
from the knowledge of its signals at discrete
instant of time
- depends upon the order in which its input
signals change and can be affected at any instant
of time
FLIP FLOP
Flip Flop
- a 2 state circuit that can remain in either state
indefinitely
- also called a Bistable Multivibrator
- an external trigger can change the output
Definition of Terms
1. Edge Triggering
- changing the output state of a flip flop on the rising and falling edge
of a clock pulse
2. Hold Time
- the minimum amount of time the input signals must be held
constant after the clock edge has struck
3. Set-Up Time
- the minimum amount of time the inputs to a flip flop must be
present before the clock edge arrives
4. Propagation Delay Time
- the time it takes for the output of a gate or flip flop to change after
the inputs have changed
5. Level Clocking
- a type of triggering in which the output of a F/F responds to the level
(high or low) of the clock signal
6. Latch
- the simplest type of F/F, consisting of 2 cross coupled NAND and NOR
latches
7. Master Slave Triggering
- type of triggering using 2 cascaded latches
master = +half cycle
slave = - half cycle
Definition of Terms
Race Condition
- an undesirable condition which may exist in a system when 2
or more inputs change simultaneously
Register
- a group of memory elements that work together as a unit
- primary purpose is to store a word
Buffer Register
- a register that temporarily stores a word during data
processing
Shift Register
- a register that can shift the stored bits one position to the left
or right (shift left, shift right)
Controlled Shift Register
- has control inputs determine what it does on the next clock
pulse
Serial Loading
- means storing a word in the shift register by entering 1 bit per
clock pulse
Parallel Loading (Broadside Loading)
- loading all bits of a word in parallel during one clock pulse
Definition of Terms
Counter
- a register capable of counting the member of clock pulses that have
arrived at its clock input
- electronic equivalent of a binary odometer
Controlled Counter
- counts clock pulses only when commanded to do so
Synchronous Counters
- a counter in which the clock drives each F/F to eliminate the ripple delay
Ring Counter
- a counter producing words with 1 high bit which shifts one position per
clock pulse
Other Counters
Modulus of a Counter
- the number of stable states a counter has
Mod 10 Counter
- divide by 10 circuit
- decade counter
Down Counter
- counts down
Up Down Counter
- F/F outputs are connected to steering networks
Presettable Counter
- the counter starts at a number greater than 0
Definition of Terms
3 State Registers
3 State switch
- a non inverting buffer that can be closed or opened by a control
signal
- a tri state switch
Bus
- a group of wires used as a common word path by several registers
Memory
- where the programs and data are stored before calculations begin
Address
- a way of specifying the location of data in memory, similar to a
house address
Access Time
- the time it takes to read the contents of a memory location after it
has been addressed
Volatile
- a type of memory in which data stored in the memory is lost
when the power is turned off
Non-Volatile
- a type of memory in which the stored data is not lost when the
power is turned off
Definition of Terms
PROM – Programmable ROM
- allows user to store data
- with a PROM programmer, the user can burn in the program
and data. Once this has been done, the programming is
permanent
- stored contents cannot be erased
EPROM – Erasable PROM
- a device that is ultraviolet-erasable and electrically
reprogrammable
EEPROM – Electrically Erasable PROM
- non volatile like EPROM, but does not require ultraviolet light
to be erased
- can be completely erased or have certain bytes changed using
electrical pulses
RAM – Random Access Memory
- Read Write Memory
- You can read the contents with a memory location or write
new contents into it
- Core Ram
- workhouse of earlier computers
Semiconductor RAM
Static RAM
- uses a bipolar or MOS F/F’s
- data is retained indefinitely as long as power is
applied to the F/F’s

Dynamic RAM
- uses MOSFET’s and capacitors that store data
- highly volatile because not only must the power be
kept on, but the capacitor charge must also be
refreshed every few msec

Bubble Memory
- sandwiches a thin film with magnetic material
between two permanent bias magnets
- logical 1’s and 0’s are represented by magnetic
bubbles in the thin film
Parts of the Computer System
2. Software
• Refers to all programs which can assist users of a particular type of computer to make the
best use of their machines
a. Related Terminologies
Program
• Detailed list of steps or instructions which must be followed to accomplish
a certain task
Branching
• Allows us to write one program that can do diff. things at different times
Debugging
• Running the program to detect, locate and correct mistakes (logic errors)
Desk Checking
• Mental checking or proofreading of the program before it is run
Flowchart
• Pictorial representation of the step by step solution or diagrammatic
representation of sequence of events
Loop
• A section of a program that repeats over and over again
Straight Line Program
• A program in which each step is followed by the next without any
alternate routes or paths
Subroutine
• A portion of the program which is called upon to perform a specific task
• When the task is finished, the main part of the program is returned to
Walkthrough
• Process in which a group of programmers- your peers review the program
and offers suggestions in a collegial way
Parts of the Computer System
b. Programming Languages
• Set of Rules for instructing the computer what
operations to perform
Machine Language
• Lowest level of programming language
• Represents data as 1’s and 0’s
Assembly Language
• Use letters as mnemonic codes to replace
1’s and 0’s of machine language
• Assembler program translate the assembly
language into the machine language
High Level Language
• Use advance commands
• Written in English like manner
• A compiler converts high level into
machine language
High Level Languages
1. FORTRAN
• Formula Translation
• The first high level language introduced by IBM in 1954
• Designed to execute complex formulas

2. COBOL
• Common Business Oriented Language
• Introduced in 1959 by CODASYL
• It has four divisions; identification, environment, data and
procedure

3. BASIC
• Beginner’s All Purpose Symbolic Instruction Code
• Introduced in 1965 by Dart-mouth
• Designed to be easy for non professional programmers to learn
and use

4. Pascal
• Named after French mathematician Blaise Pascal
• Developed by Nicklaus Wirth
• Designed to encourage the programmer to adhere to what is
considered as “correct” programming practice

You might also like