0% found this document useful (0 votes)
22 views27 pages

Ss2 1st Term

The document provides an overview of the Central Processing Unit (CPU), detailing its definition, history, main components (Control Unit and Arithmetic Logic Unit), and functions. It also explains the memory unit, types of memory (primary and secondary), and their characteristics, including RAM and ROM. Additionally, it covers units of storage, conversions between them, and introduces logic gates as fundamental components of digital circuits.

Uploaded by

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

Ss2 1st Term

The document provides an overview of the Central Processing Unit (CPU), detailing its definition, history, main components (Control Unit and Arithmetic Logic Unit), and functions. It also explains the memory unit, types of memory (primary and secondary), and their characteristics, including RAM and ROM. Additionally, it covers units of storage, conversions between them, and introduces logic gates as fundamental components of digital circuits.

Uploaded by

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

Central Processing Unit

Class: SSS 2

Definition of the CPU


The Central Processing Unit (CPU) also known as the microchip or the

microprocessor (or processor for short) is the electronic circuitry within a

computer that carries out the instructions of a computer program. This is the

brain or heart of the computer. The main objective of the CPU is to perform

mathematical calculations on binary numbers. Most modern CPUs are

microprocessors, meaning they are contained on a single integrated circuit

(IC) chip. Some computers employ a multi-core processor, which is a single

chip containing two or more CPUs called "cores".

Brief history of the CPU


The fourth generation computers started with the invention of the

Microprocessor. The Microprocessor contains thousands of ICs. Ted Hoff

produced the first microprocessor in 1971 for Intel.

Picture of the CPU

Main Components of the Central Processing Unit


The central processing unit consists of two main parts. Which are;

1. Control Units (CU)

2. Arithmetic Logic Unit (ALU)

The Control Unit


The control unit uses electrical signals to direct the entire computer system to

carry out or execute, stored program instructions. Like an orchestra leader,

the control unit does not execute program instructions; rather, it directs other

parts of the system to do so. The control unit must communicate with both the

arithmetic/logic unit and memory.

Functions of the control unit The control Unit

i. It activates the appropriate circuits necessary for inputs and output devices.

ii. It causes the entire computer system to operate automatically.

iii. It directs the system to execute instructions.

iv. It helps in communication between the memory and the arithmetic logic

unit.

v. It aids in the loading of data and instructions residing in the secondary

memory to the main memory as required.

The Arithmetic Logic Unit (ALU)


The arithmetic/Logic unit: This part of the CPU executes all arithmetic and

logical operations. It is also defined as part of the CPU that carries out

arithmetic and logic operations on operands in computer instruction.

Functions of the ALU

i. The arithmetic and logic unit executes arithmetic and logical operation.

Arithmetic operations include addition, subtraction, multiplication and division.

Logical operations compare numbers, letters and special characters.

ii. Compares operation test for three conditions:


Memory Unit

TOPIC: Memory Unit

Class: SSS Two

What is the Memory Unit?


i. The memory unit is part of the computer that holds data and instructions for

processing.

ii. It may also be defined as the storage space in the computer where data to

be processed and instructions required for processing are stored.

Although closely associated with the central processing unit, the memory unit

is separated from it.

Types of Memories in Computer


Memory is of two types:

i.Primary memory/main memory/internal memory

ii.Secondary memory/auxiliary memory/external memory

Primary Memory:

The primary memory is the memory that can be directly accessed by the CPU,

the CPU constantly interact with it, reads instructions stored there and

executes them as required.

Types of Primary memory


There are two types of primary memory:

i. RAM
ii. ROM

RAM (Radom Access Memory):

Random access memory also called the Read/Write memory, is the temporary

memory of a computer. It is said to be ‘volatile’ since its contents are

accessible only as long as the computer is on. The contents of RAM are

cleared once the computer is turned off or if there is a power cut.

Types of RAM

1. Dynamic RAM: Dynamic RAM (DRAM) is a type of physical memory used

in most personal computers. The term dynamic indicates that the memory

must be constantly refreshed (reenergized) or it will lose its contents.

2. Static RAM: Static RAM (SRAM) is a type of RAM that holds its data without

external refresh, for as long as power is supplied to the circuit. This is

contrasted to dynamic RAM (DRAM), which must be refreshed many times

per second to hold its data contents

ROM (Read Only Memory)

Read Only Memory is a special type of memory which can only be read and

the contents of which are not lost even when the computer is switched off or if

there is a power cut. It typically contains the manufacturer’s instructions.

Types of ROM

i. Programmable Read-Only Memory (PROM): This type of ROM can be re-

programmed by using a special device called a PROM programmer.

Generally, a PROM can only be changed/updated once.

ii. Erasable Programmable Read-Only Memory (EPROM): This type of ROM


can have its contents erased by ultraviolet light and then reprogrammed by a

PROM programmer. This procedure can be carried out many times; however,

the constant erasing and rewriting will eventually render the chip useless.

iii. Electrically Erasable Programmable Read-Only Memory (EEPROM): These

are also erasable like EPROM, but the same work of erasing is performed with

electric current. Thus, it provides the ease of erasing it even if the memory is

positioned in the computer. It stores the computer system’s BIOS. Unlike

EPROM, the entire chip does not have to be erased for changing some

portion of it. Thus, it even gets rid of some biggest challenges faced by using

EPROMs.

Differences between RAM and ROM


RAM ROM
It is volatile (It loses data when power is It is non-volatile (retains data even
turned off) when power is off)
Data in RAM can be changed or deleted ROM is fixed or data cannot be modified.
RAM chip are bigger in size ROM chip are smaller in size
RAM chips are relatively expensive ROM chips are relatively less expensive
RAM stores all the applications and data ROM usually stores instructions that are
when the computer is running required for booting the computer

Secondary Memory
This type of memory is a non-volatile memory. It is slower than the main

memory. These are used for storing data/Information permanently. CPU

directly does not access these memories instead they are accessed via input-

output routines. Contents of secondary memories are first transferred to the

main memory, and then the CPU can access it.

Types of Secondary Memory


Secondary memory can be of the following types:

Magnetic: Data and information are stored and retrieved using magnetism

Examples

Magnetic disk

Magnetic tape

Hard disk

floppy disks

Optical: Optical storage devices employ light (laser beams) to store and

retrieve data and information

Examples

CD

VCD

DVD

Electronic: This holds data and information in the form of electric voltage

Example

Flash Memory

Others include Punch card

Secondary Storage Devices

1. Floppy Diskette

There are two standard sizes used these days which are 5 □((1 )/4) inches

and 3 □(1/2) inches, in size, commonly referred to as the mini-floppy and


microfloppy. The capacity of 5 □((1 )/4) inches floppy is 1.2 MB and that of 3

□(1/2) inches is 1.44 MB.

2. CD-ROM drives

They are of three types

a. CD-ROM

CD-ROM stands for (Compact Disc Read Only Memory), and it is mainly used

to mass produce audio CDs and computer games. Computer users can only

read data and music from the discs, but they cannot burn their information

onto the discs, from their personal computers.

b. CD-R

CD-R (Compact Disc Recordable) also known as WORM (Write Once Read

Many) is a blank disc that users can put into a CD-ROM drive to burn or make

a copy of their personal data, music, videos and information. CD-Recordable

discs are designed for one-time recording only.

3. CD-RW

The CD-RW (Compact Disc Rewritable) can be erased and returned to its

original blank state. New files can then be copied onto the rewritable disk. CD-

RW never became as popular as the CD-R because they are not compatible

with most disc players to listen to music. They are primarily used to move data

from one computer to another or to copy files that are only needed a few

times.

3. DVD (Digital Versatile Disk)

DVD is very similar to a CD but it has a much larger capacity. A standard DVD
can hold 4.7 GB of data. DVDs are of the same types as CDs along with

different formats as explained about CDs.

4. Combo Drives

These drives combine the function of a DVD drive and a CD-R4W drive.

5. Hard disk: Largest in capacity

Differences between Primary and Secondary


Memory
Primary Memory Secondary Memory
These devices are temporary (Volatile)These devices are permanent (Non-volatile)
These devices are expensive These devices are cheaper
They have less storage capacity They have storage capacities
They are usually faster They are slower
Directly accessed by the CPU Not directly accessed by the CPU
Internal memory External Memory

Units of Storage in Computer


i. Bit (b): Bits is an acronym that stands for Binary digITS. It is the Smallest

Unit of data on a binary computer. A single bit consists of 0 (zero) or 1 (one).

ii. Nibble (nybble, nyble, or nybl): A nibble is a collection of four bits.

iii. Bytes (B): A byte consists of eight bits. It is the smallest item that can be

individually accessed by a program. It is the fundamental unit of storage on a

binary computer.

iv. Word: A word is a collection 32 bits.

v. Kilobyte (KB): A Kilobyte consists of 210 (1,024) Bytes which is

approximately 1000 Bytes.

vi. Megabyte (MB): One Megabyte consists of 220 (1,048,576) Bytes.

vii. Gigabyte (GB): A Gigabyte is a collection of 230 (1,073,741,824) Bytes.


viii. Terabyte (TB): A Terabyte consists of 240 (1,099,511,627,776) Bytes.

ix. Petabyte (PB): A Petabyte consists of 250 (1,125,899,906,842,624) Bytes.

x. Exabyte (EB): An Exabyte consists of 260 (1,152,921,504,606,846,976)

Bytes.

xi. Zettabyte (ZB): A Zettabyte consists of

270 (1,180,591,620,717,411,303,424) Bytes.

xii. Yottabyte (YB): A Yottabyte consists of

280 (1,208,925,819,614,629,174,706,176) Bytes.

Conversion from one Unit to another


The conversion process from one unit to another can be done using the

following relationships.

1 bit = 0 or 1

1 nibble = 4 bits

1 bytes = 8 bits

1 word = 16 bits

1 KB = 1024 bytes

1 MB = 1024 KB

1 GB = 1024 MB

1 TB = 1024 GB

1 PB = 1024 TB

1 EB = 1024 PB

1ZB = 1024 EB

1 YB = 1024 ZB
Example 1

Convert 1208bits to byte

Solution

We are required to convert 1204 bits to byte

Let the unknown byte be x

It implies that;

1208bits = xbyte

The relationship between bits and byte is

8bits = 1 byte

Cross multiplying we have

xbyte × 8bits = 1208bits × 1byte

Divide both sides by the coefficient of the unknown unit of storage which is the

8bits

(xbyte × 8bits)/(8bits) = (1208bits × 1byte)/(8bits)

xbyte = (1208 byte)/8

xbyte = 151bytes

Therefore 1208bits = 151bytes

Example 2

Convert 330KB to byte

Solution

We are required to convert 330KB to byte

Let the unknown byte be x

It implies that;
330KB = xbyte

The relationship between kb and byte is

1KB = 1024byte

Cross multiplying we have

xbyte × 1KB = 330KB × 1024byte

Divide both sides by the coefficient of the unknown unit of storage which is the

1 kb

(xbyte × 1KB)/(1KB) = (330KB × 1024byte)/(1KB)

xbyte = 330 × 1024bytes

xbyte = 337920bytes

Therefore 330kb = 337920bytes

Example 3

Convert 14200 KB to MB

Solution

We are required to convert 14200 to kilobyte

Let the unknown kilobyte be x

It implies that;

14200KB = xMB

The relationship between KB and MB is

1024KB = 1MB

Cross multiplying we have

xMB × 1024KB = 14200KB × 1MB


Divide both sides by the coefficient of the unknown unit of storage which is the

1024 byte

(xMB × 1024KB)/(1024KB) = (14200KB × 1MB)/(1024KB)

xMB = (14200 × 1MB)/1024

xKB = 13.87MB

Therefore 1420KB =13.87MB

Example 4

Convert 1.44 MB to Byte (B)

Solution

We are required to convert 1.44MB to B

Let the unknown B be x

It implies that;

1.44MB = xB

The relationship between MB and B is

1MB = 1024 × 1024B

1MB = 1048576B

Cross multiplying we have

xB × 1MB = 1.44MB × 1048576B

Divide both sides by the coefficient of the unknown unit of storage which is the

1MB

(xB × 1MB)/(1MB) = (1.44MB × 1048576B)/(1MB)

xB = (1.44 × 1048576B)/1
x B=1509949.44B

Therefore 1.44MB = 1509949.44B

Example 5

Two storage devices have capacities of 2KB and 2MB respectively:

i. Calculate the number of bits each can hold

ii. putting the two storage together, calculate the total capacity in bytes

Solution

2 KB to bits

Let the unknown bits be x

2KB = xbits

but 1KB = 8 × 1024bits

1KB = 8192bits

cross multiply

xbits × 1KB = 2KB × 8192bits

Divide both sides by 1 kb

(xbits × 1KB)/(1KB) = (2KB × 8102bits)/(1KB)

xbits = 16384bits

2KB = 16384bits

2 MB to bits

Let the unknown bits be y

2MB = ybits

but 1MB = 8 × 1024 × 1024bits


1MB = 8388608bits

cross multiply

ybits × 1MB =2MB × 8388608bits

Divide both sides by 1MB

(ybits × 1MB)/(1MB) = (2MB × 8388608bits)/(1MB)

ybits=16777216bits

2MB = 16777216bits

ii. Putting the two storages together

(16384 + 16777216)bits= 16793600bits

Next is to convert 16793600bits to bytes

Let the unknown bytes be z

16793600bits = zbytes

but 8bits = 1bytes

cross multiply

zbytes × 8bits = 16793600bits × 1bytes

Divide both sides by 8 bytes

(z bytes × 8 bits)/(8 bits) =(16793600 bits× 1 bytes)/(8bits)

z bytes=2099200 bytes

Therefore the two storage capacity in bytes is 2099200 bytes

Logic Circuit I (Standard Single Logic Gate)

Topic: Logic Circuit I (Standard Single Logic Gate)


Class: SSS Two

Definitions of Logic Gate

1. A logic gate is an elementary building block of a digital circuit.

2. It is also defined as an electrical circuit, that performs one or more logical

operations on one or more input signals.

3. Logic gates are devices that implement Boolean functions, i.e. it does a logic

operation on one or more bits of input and give a bit as an output.

Most logic gates have two inputs and one output. At any given moment, every

terminal is in one of the two binary conditions low (0) or high (1), represented by

different voltage levels. In most logic gates, the low state is approximately zero volts

(0 V), while the high state is approximately five volts positive (+5 V).

Types of Standard Single Logic gate

There are three types of standard single logic gates. They are:

1. AND gate

2. OR gate

3. NOT gate

AND gate`

An AND gate will give a high output only if all of the inputs are high. For example, in

a simple lighting circuit with two switches in series, the lamp will light only if both

switches are pressed.

Logic Symbol for AND gate


Truth Table of the AND gate

INPUT INPUT OUTPUT

A B C

o o o

o 1 o

1 o o

1 1 1

OR Gate

An OR gate is a digital logic gate that gives an output of 1 when any of its inputs are

1, otherwise 0.

Logic Symbol for OR Gate

Truth Table of the OR Gate

INPUT INPUT OUTPUT

A B C

o o o

o 1 1

1 o 1

1 1 1
A NOT gate is often called an inverter. A NOT gate is slightly different because it has

just one input. It will give a high output if the input is low and vice versa.

Logic Symbol for NOT Gate

Truth Table of the NOT gate

INPUT OUTPUT

A C

0 1

1 0

Logic Equations

Aside from representing the function of a logic gate with a truth table and

grammatical definition, the use of logic equations can be used to represent logic

gates and circuits.

The AND gate Equation

The AND gate operation can be expressed by a Boolean algebra equation. For a 2-

input AND gate, the equation is:

X=A.B

The symbol for the AND operation is a centre dot (.). It does not mean multiplication.

The expression reads ‘X’ equal to A and B.

The OR Gate Equation

The OR gate operation can also be expressed by a Boolean algebra equation. For a

2-input OR gate, the equation is:

X= A+B
The symbol for the OR operation is a +. It does not mean addition. The expression

reads X equal to A or B.

NOT Gate Equation

The NOT gate operation can also be expressed by a Boolean algebra equation

X= Ā

A complement bar (also called an over bar) is placed over the assigned input letter.

The expression reads ‘X’ is equal to not ‘A’

Logic Circuit II (Alternative Logic Gate)

Topic: Logic Circuit II (Alternative Logic Gate)

Class: SSS Two

Definition of Alternative Logic Gate

Alternative logic gates are those that are the combination of two logic gates.

Types of Alternative Logic Gates

There are generally two types

1. NAND gate

2. NOR gate

NAND Gate

NAND gate is the combination of both an AND gate and a NOT gate. It operates the

same as an AND gate but the output will be the opposite.

Logic Symbol for the NAND Gate


Truth Table for NAND Gate

INPUT INPUT OUTPUT


A B C

o 0 1
0 1 1
1 0 1
1 1 0

NAND Gate Equation

The NAND gate equation can also be expressed by a Boolean algebra equation.

For 2 input NAND gate the equation is:

The expression is the same as the AND gate with an over bar above the entire

portion of the equation representing the input. This equation reads X equals A and B

NOT.

NOR Gate

The NOR gate is the combination of both OR gate and a NOT gate. It operates the

same as an OR gate, but the output will be the opposite.

Logic symbol for the NOR gate

Truth Table for the NOR Gate

INPUTINPUTOUTPUT
A B C

0 0 1
0 1 0
1 0 0
1 1 0

NOR Gate Equation

The NOR gate operation can also be expressed by a Boolean algebra equation. For

a 2-input NOR gate the equation is:

The expression reads X equals to A or B NOT.

Uses of Logic Gates

Logic gates can be used to:

i. build digital circuit

ii. design complex ICs

iii. construct a simple alarm

iv. control traffic light

XOR (Exclusive-OR) gate

The XOR gate acts in the same way as the logical either/or. The output is true if

either, but not both, of the input, is true. Another way of looking at this circuit is to

observe that the output is 1 if the inputs are different, but 0 if the input are the same.

Logic Symbol for the NOR Gate


Truth Table for the XOR Gate

INPUT INPUT OUTPUT


A B C

0 0 0
0 1 1
1 0 1
1 1 0

XOR Equation

Or

XOR as a Simple Comparator

The XOR gate can be used to construct a Simple Comparator. A comparator is a

combinational logic circuit that compares the magnitudes of two binary quantities to

determine which one has the greater magnitude. XOR can the used as a basic

comparator

Computer Data Conversion

Topic: Computer Data Conversion

Class: SSS Two

Definition of Terms
Data Conversion
Data conversion is the transformation of computer data from one format to

another.

Registers

Registers are temporary storage areas for instruction or data.

It can also be defined as a special, high-speed storage area within the CPU.

Registers are not part of the memory; but rather, they are additional storage

locations that offer the advantage of speed. Register works under the direction

of the control unit to accept, hold and transfer instruction or data and perform

arithmetic or logical comparison at high speed. Registers are the fastest

memory available for use in the PC because they are hard-wired right into the

processor logic.

Address

A memory address is an identifier for a memory location at which a computer

program or a hardware device can store data and later receive it.

Bus

A bus is a set of physical connections (cables, printed circuits, etc.) which can

be shared by multiple hardware components to communicate with one

another. The purpose of buses is to reduce the number of "pathways" needed

for communication between components, by carrying out all communications

over a single data channel. This is why the metaphor of a "data highway" is

sometimes used. If only two hardware components communicate over the

line, it is called a hardware port (such as a serial port or parallel port).


A bus is characterized by the amount of information that can be transmitted at

once. This amount, expressed in bits, corresponds to the number of physical

lines over which data are sent simultaneously. A 32-wire ribbon cable can

transmit 32 bits in parallel. The term, "width" refers to the number of bits a bus

can transmit at once. In addition, the bus speed is also defined by its

frequency (expressed in Hertz), the number of data packets sent or received

per second. Each time that data is sent or received is called a cycle. This way,

it is possible to find the maximum transfer speed of the bus, the amount of

data which it can transport per unit of time, by multiplying its width by its

frequency.

Example: What is the speed of a bus with a width of 16 bits and a frequency

of 133 MHz?

Solution

Types of Computer Buses


Internal Bus: The internal bus (sometimes called the front-side bus, or FSB

for short). The internal bus allows the processor to communicate with the

system's central memory (the RAM).

Expansion Bus: The expansion bus (sometimes called the input/output bus)

allows various motherboard components (USB, serial, and parallel ports,

cards inserted in PCI connectors, hard drives, CD-ROM and CD-RW drives,

etc.) to communicate with one another. However, it is mainly used to add new

devices using what are called expansion slots connected to the input/output
Address bus: carries memory addresses from the processor to other

components such as primary storage and input/output devices. The address

bus is unidirectional, that is, data only move in one direction.

Data bus: carries the data between the processor and other components. The

data bus is bidirectional, that is, data can move in two directions (to and fro

simultaneously)

Control bus: carries control signals from the processor to other components.

The control bus also carries the clock's pulses. The control bus is

unidirectional, that is, data only move in one direction.

Types of Register and their Functions


There are many types of registers; some of them are examined below:

Memory Data Register (MDR): This register contains the data to be stored in

the computer storage or the data after a fetch from the computer storage.

Current Instruction Register (CIR): CIR stores the instruction currently being

executed or decoded.

Memory Address Register (MAR): MAR holds the memory address of data

and instruction.

Program Counter (PC): PC is commonly called instruction pointer (IP) and

sometimes called instruction address register. It is a register that holds the

address of the memory location of the next instruction when the current

instruction is executed by the microprocessor.

Accumulator Register: This register is used for storing the results that are

produced by the system.


Functions of Registers
Functions of the registers are:

i.Registers hold the address of memory where the CPU wants to read or write

data

ii. They hold the contents of data instruction read from or written in memory

iii.They are used to specify the address of a particular I/O device

iv. Registers are used for exchanging data between the I/O module and the

processor

v. They store current instructions being executed or coded

vi. Registers allow the bits of its content to be moved to left or right (shift

register)

vii.They hold the memory addresses of data and instructions during the

execution phase

viii. Registers store the result produced by the system

Differences between Registers and Main Memory


Register Main Memory

Registers are located inside the processor Main memory is located outside the processor

They are very fast They are slow

They are small in capacity They are large in capacity

Fetch-Execute Cycle
The fetch-execute cycle is the sequence the computer follows to transform

data from one format to another.

The steps in the processing cycle are as follows:

Fetch the next instruction: The program counter contains the address of the

next instruction to be executed; the control unit goes to the address in the

memory specified in the program counter, makes a copy of the contents and

places the copy in the instruction register.

Decode the Instruction: To execute the instruction in the instruction register,

the control unit has to determine what the instruction is.

Get Data If Needed: It may be that the instruction to be executed requires

additional memory accesses to complete its task. If this is the case, the control

unit must get the content of the memory location.

Execute the Instruction: Once an instruction has been decoded and any

data fetched, the control unit is ready to execute the instruction. Execution

involves sending signals to the arithmetic/logic unit to carry out the

processing. When the execution is complete, the cycle begins again.

Fetch-Execute Cycle Flow Diagram

Factors Affecting the Speed of Data Transfer


i. The amount of RAM: The larger the size of the computer RAM the faster

the speed of data transfer and vice versa.

ii. The speed and generation of your CPU (the system clock): The speed
of the computer is measured in Hertz (Hz) which is the number of tasks it can

process per second. A computer with a specification 2GHz can process 2

billion tasks in one second. This implies that the faster the speed of the

computer the faster the speed of data transfer.

iii. The size of the Register on your CPU: The speed of data transfer will be

faster if the size of the register is also large and vice versa.

iv. The Bus width: The larger the width of a bus, the faster the number of bits

that bus can transmit at once.

v. The Bus speed: High bus speed will favour faster speed of data transfers

vi. The amount of Cache memory: Cache memory is a temporary memory

that holds frequently accessed data and instructions for faster and more

efficient processing by the CPU. The higher the size of cache memory the

faster the speed of data transfer. The downside of the cache memory is that it

trades off capacity for speed.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy