Ss2 1st Term
Ss2 1st Term
Class: SSS 2
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
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
i. It activates the appropriate circuits necessary for inputs and output devices.
iv. It helps in communication between the memory and the arithmetic logic
unit.
logical operations. It is also defined as part of the CPU that carries out
i. The arithmetic and logic unit executes arithmetic and logical operation.
processing.
ii. It may also be defined as the storage space in the computer where data to
Although closely associated with the central processing unit, the memory unit
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
i. RAM
ii. ROM
Random access memory also called the Read/Write memory, is the temporary
accessible only as long as the computer is on. The contents of RAM are
Types of RAM
in most personal computers. The term dynamic indicates that the memory
2. Static RAM: Static RAM (SRAM) is a type of RAM that holds its data without
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
Types of ROM
PROM programmer. This procedure can be carried out many times; however,
the constant erasing and rewriting will eventually render the chip useless.
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
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.
Secondary Memory
This type of memory is a non-volatile memory. It is slower than the main
directly does not access these memories instead they are accessed via input-
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
Examples
CD
VCD
DVD
Electronic: This holds data and information in the form of electric voltage
Example
Flash Memory
1. Floppy Diskette
There are two standard sizes used these days which are 5 □((1 )/4) inches
2. CD-ROM drives
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
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
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.
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
4. Combo Drives
These drives combine the function of a DVD drive and a CD-R4W drive.
iii. Bytes (B): A byte consists of eight bits. It is the smallest item that can be
binary computer.
Bytes.
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
Solution
It implies that;
1208bits = xbyte
8bits = 1 byte
Divide both sides by the coefficient of the unknown unit of storage which is the
8bits
xbyte = 151bytes
Example 2
Solution
It implies that;
330KB = xbyte
1KB = 1024byte
Divide both sides by the coefficient of the unknown unit of storage which is the
1 kb
xbyte = 337920bytes
Example 3
Convert 14200 KB to MB
Solution
It implies that;
14200KB = xMB
1024KB = 1MB
1024 byte
xKB = 13.87MB
Example 4
Solution
It implies that;
1.44MB = xB
1MB = 1048576B
Divide both sides by the coefficient of the unknown unit of storage which is the
1MB
xB = (1.44 × 1048576B)/1
x B=1509949.44B
Example 5
ii. putting the two storage together, calculate the total capacity in bytes
Solution
2 KB to bits
2KB = xbits
1KB = 8192bits
cross multiply
xbits = 16384bits
2KB = 16384bits
2 MB to bits
2MB = ybits
cross multiply
ybits=16777216bits
2MB = 16777216bits
16793600bits = zbytes
cross multiply
z bytes=2099200 bytes
3. Logic gates are devices that implement Boolean functions, i.e. it does a logic
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).
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
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.
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.
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
The AND gate operation can be expressed by a Boolean algebra equation. For a 2-
X=A.B
The symbol for the AND operation is a centre dot (.). It does not mean multiplication.
The OR gate operation can also be expressed by a Boolean algebra equation. For a
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.
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.
Alternative logic gates are those that are the combination of two logic gates.
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
o 0 1
0 1 1
1 0 1
1 1 0
The NAND gate equation can also be expressed by a Boolean algebra equation.
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
INPUTINPUTOUTPUT
A B C
0 0 1
0 1 0
1 0 0
1 1 0
The NOR gate operation can also be expressed by a Boolean algebra equation. For
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.
0 0 0
0 1 1
1 0 1
1 1 0
XOR Equation
Or
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
Definition of Terms
Data Conversion
Data conversion is the transformation of computer data from one format to
another.
Registers
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
memory available for use in the PC because they are hard-wired right into the
processor logic.
Address
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
over a single data channel. This is why the metaphor of a "data highway" is
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
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
for short). The internal bus allows the processor to communicate with the
Expansion Bus: The expansion bus (sometimes called the input/output bus)
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
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
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.
address of the memory location of the next instruction when the current
Accumulator Register: This register is used for storing the results that 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
iv. Registers are used for exchanging data between the I/O module and the
processor
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
Registers are located inside the processor Main memory is located outside the processor
Fetch-Execute Cycle
The fetch-execute cycle is the sequence the computer follows to transform
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
additional memory accesses to complete its task. If this is the case, the control
Execute the Instruction: Once an instruction has been decoded and any
data fetched, the control unit is ready to execute the instruction. Execution
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
billion tasks in one second. This implies that the faster the speed of the
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
v. The Bus speed: High bus speed will favour faster speed of data transfers
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