COA Learning Guide
COA Learning Guide
2.1 Introduction
This unit covers the competencies required to understand Computer Organisation and
Architecture. It involves understanding principles of computer organisation and design,
understanding central processing unit functions, understanding computer memory
organization, understanding input-output functions and understanding computer arithmetic and
logic.
Introduction
This learning outcome covers defining computer organisation, explaining and structure and
function of computer components and identifying hardware components.
Computer Architecture deals with giving operational attributes of the computer or Processor
to be specific. It deals with details like physical memory, ISA of the processor, the no of bits
used to represent the data types, Input Output mechanism and technique for addressing
memories.
Examples are things that are transparent to the programmer:
● control signals
● interfaces between computer and peripherals
● the memory technology being used
It is basically a circuit board of a decent size, depending on the size of the computer we‟re
dealing with. It facilitates the communication of the other components in the computer. There
are ports on the motherboard that face the outside of the computer, allowing you to plug in
different components into your computer and also to charge it.
Most motherboards also allow you to scale up by including slots that allow for expansion. You
could add in components like CPUs and RAMs, Video cards, and so on. You can also expand
the motherboard by adding more ports that allow you to connect even more auxiliary devices
to your computer. In other words, you have control over just what your computer‟s capabilities
are.
Apart from this, the motherboard plays other roles like storing some simple information when
the computer is off, such as the system time. That‟s why your computer always tells you the
correct time, even when you turn it on after a long time
.
Figure 1:Motherboard
Power supply
As the name suggests, it powers all other components of the machine. It usually plugs into the
motherboard to power the other parts. The power supply connects to either an internal battery
(on a laptop) or a plug for an outlet (on a desktop).
They have different input voltage depending on the machine/computer specifications.
Since RAM is only temporary, it has a volatile nature. The minute you turn your computer off,
all of the memory that is stored in RAM is lost. That‟s why you‟re advised to keep saving the
work you do in applications as you go along to avoid losing all of it in case your computer
suddenly goes off.
The more RAM you have, the greater the number of programs that you can run
simultaneously.
Figure 4: RAM
Solid state drives have the same kind of memory as the one on your phone or flash drive, also
known as flash memory. They cost more but are also faster and more efficient than traditional
hard drives.
The data stored in the hard drive does not disappear when you switch your computer off. It
will be there when you switch the computer back on. You are, however, advised to keep it far
away from magnets as they could damage it and cause you to lose your information.
Video Card
The video card is a dedicated unit for handling image output to be displayed by the monitor.
They come with their own RAM, dedicated to this singular purpose. If your work involves
highly visual work at very high definitions, then you should get yourself a video card to take
the load off your RAM.
Sometimes, the computer may have integrated graphics, where some of the RAM is borrowed
for graphics processing. This happens frequently on laptops, because there is a need to save
space. Using integrated graphics is much less expensive using a graphics card, but is not
sufficient for intense graphics functions.
Optical devices
These have become a lot less common today, with many machines doing away with them
altogether. An optical drive is used to read CDs and DVDs, which can be used to listen to
music or watch movies. They can also be used to install software, play games, or write new
information into a disk.
In summary, here's the inside of a desktop computer with its parts labeled:
Figure 8: Computer Internal components
Conclusion
At the end of this learning outcome, the learner should be able to define computer
organisation, explain and structure and function of computer components and identify
hardware components.
Further Reading
https://www.com/computer-organization-mcqs-basic-operational-concept/
2.3.2.3 Self-Assessment
Written Assessment
1. Which memory device is generally made of semiconductors?
a) RAM
b) Hard-disk
c) Floppy disk
d) CD ROM
2. The register which holds the address of the location to or from which data are to be
transferred is called
a) Instruction registers
b) Index register
c) Memory address
d) Memory data register
3. The device which is used to connect a peripheral to bus is called
a. Control Register
b. Interface
c. Communication Protocol
d. None of the above
4. Which of the following is not a form of memory?
a. Instruction cache
b. Instruction register
c. Instruction opcode
d. Both (a and b)
5. Which memory is difficult to interface with the processor?
a. Static memory
b. Dynamic memory
c. ROM
d. None of the Above
6. Which one of the following is an optical device?
a. DVD
b. Mouse
c. Desktop
d. Monitor.
7. What is computer hardware?
a. A medium for data communications
b. A physical device that is driven by data
c. A physical that is driven by software
d. All of the above
8. What does R in RAM stand for?
a. Re-write
b. Read
c. Readable
d. Random
9. DVD stands for?
a. Digital video data
b. Direct video
c. Digital versatile disk
d. Direct vertical disk
10. Which among the following storage devices is considered portable
a. Hard Disk
b. Magnetic Tape
c. Flash Drive
d. ROM
Oral Assessment
1. Differentiate functional and basic components.
2. Describe the functions of the RAM
3. What is a chipset?
Practical Assessment
You have been presented a set of hardware components. From the set, identify
The hard disk
Memory
Power Supply
An optical disk
2.3.2.5 References
1. https://mrcet.com/downloads/digital_notes/IT/COMPUTER%20ORGANIZATION%2
0(R17A0510).pdf
2. The "History of Computing" assembled Society by the IEEE Computer in 1996.
2.3.3 Learning Outcome 2: Understand Central Processing Unit functions
2.3.3.1 Learning Activities
2.1 The Central Processing Unit is explained. Activities may be carried out in
2.2 CPU architecture is explained groups or as individual
2.3 Role of registers is explained
2.4 Instruction representation and execution is explained
2.5 CPU specifications are prescribed for a user
2.6 CPU specifications are verified for a given computer
Introduction
This learning outcome covers explaining the Central Processing Unit design, CPU architecture,
role of registers, instruction representation and execution, prescribing CPU specifications and
verifying CPU specifications for a given computer.
Definitions
❏ CPU is the electronic circuitry within a computer that carries out the instructions of a
computer program.
❏ Registers, a memory location within the actual processor that works at very fast speeds. It
stores instructions which are waiting to be decoded or executed.
CPU
It is s the electronic circuitry within a computer that carries out the instructions of a computer
program by performing the basic arithmetic, logical, control and input/output (I/O) operations
specified by the instructions.
Types of Processors
There are 2 different types of processors. These include:
● Complex instruction set computers (CISC)
● Reduced instruction set computers (RISC)
CISC
These processors can do complex operations, which can be carried out in just one instruction.
They have many different addressing modes and a wide range of instructions that can be used.
For example, a CISC processor might have a 'complicated' instruction designed into the
hardware called 'POWER'. This can take one number from a register, find the power of that
number, held in a different register, and then store the result in yet a third register. So, 2 to the
power 4 would be calculated as 16 and this would be stored in a third register. This would all
be done using one complex instruction, which might take about 3 or 4 CPU clock cycles to
complete.
RISC
There are also CPUs that are known as RISC (pronounced „risk‟), or Reduced Instruction Set
Computers. RISC processors such as ultra-SPARC and ALPHA use a much smaller, simpler
set of instructions than CISC processors and so to carry out any particular programming task
may take many „fetch decode execute‟ cycles. RISC processors, however, are much more
efficient at processing huge blocks of data than CISC.
Control Unit
This unit controls the operations of all parts of the computer but does not carry out any actual
data processing operations.
Functions of this unit are −
● It is responsible for controlling the transfer of data and instructions among other units of
a computer.
● It manages and coordinates all the units of the computer.
● It obtains the instructions from the memory, interprets them, and directs the operation of
the computer.
● It communicates with Input/output devices for transfer of data or results from storage.
● It does not process or store data.
Arithmetic Section
Function of the arithmetic section is to perform arithmetic operations like addition, subtraction,
multiplication, and division. All complex operations are done by making repetitive use of the
above operations.
Logic Section
Function of the logic section is to perform logic operations such as comparing, selecting,
matching, and merging of data.
Role of Registers
Processor register is a quickly accessible location available to a digital processor's central
processing unit.
The registers are an integral part of the CPU. They are a type of memory that can be accessed
very quickly compared to other types of memory. The pieces of information they hold are
needed by the CPU to run each program instruction during a 'fetch-decode-execute cycle' or
can be used to hold values that are generated as part of the ALU working on data. There are a
number of very special registers that do very specific jobs.
Figure 9:CPU Registers
Buses
A BUS is a data connection between two or more devices connected to the computer. For
example, a bus enables a computer processor to communicate with the memory or a video card
to with the memory.
These buses carry different types of signals. The same types of buses carry only one type of
signal. These buses help to increase the efficiency and accuracy of working.
A computer consists of many components such as motherboard, memory, input/output devices.
These devices work with the help of buses. PC motherboards have buses for expansion and
external devices, all computers have three basic buses.
During the fetch execute cycle, the computer retrieves a program instruction from its memory.
It then establishes and carries out the actions that are required for that instruction.
The cycle of fetching, decoding, and executing an instruction is continually repeated by the
CPU whilst the computer is turned on.
1. Fetch
The first step the CPU carries out is to fetch some data and instructions (program) from main
memory then store them in its own internal temporary memory areas. These memory areas are
called 'registers'.
For this to happen, the CPU makes use of a vital hardware path called the 'address bus'.
The CPU places the address of the next item to be fetched on to the address bus.
Data from this address then moves from main memory into the CPU by travelling
along another hardware path called the 'data bus'.
2. Decode
The next step is for the CPU to make sense of the instruction it has just fetched. This
process is called 'decode'.
The CPU is designed to understand a specific set of commands. These are called the
'instruction set' of the CPU. Each make of CPU has a different instruction set.
The CPU decodes the instruction and prepares various areas within the chip in
readiness of the next step.
3. Execute
This is the part of the cycle when data processing actually takes place. The instruction is
carried out upon the data (executed). The result of this processing is stored in yet another
register.
Once the execute stage is complete, the CPU sets itself up to begin another cycle once more.
Instruction Set
Instruction sets are instruction codes to perform some task. It is classified into five categories.
The instruction set, also called ISA (instruction set architecture) is part of a computer that
pertains to programming, which is basically machine language. The instruction set provides
commands to the processor, to tell it what it needs to do. The instruction set consists of
addressing modes, instructions, native data types, registers, memory architecture, interrupt, and
exception handling, and external I/O.
An example of an instruction set is the x86 instruction set, which is common to find on
computers today. Different computer processors can use almost the same instruction set while
still having very different internal design.
Both the Intel Pentium and AMD Athlon processors use nearly the same x86 instruction set. An
instruction set can be built into the hardware of the processor, or it can be emulated in software,
using an interpreter. The hardware design is more efficient and faster for running programs than
the emulated software version.
Conclusion
At the end of this learning outcome, the learner should be able to explain the Central
Processing Unit design, the CPU architecture, the role of registers and instruction
representation and execution, prescribe CPU specifications and verify CPU specifications for a
given computer.
Further Reading
1. https://www.tutorialspoint.com/computer_logical_organization/index.htm
2. https://www.javatpoint.com/computer-organization-and-architecture-tutorial
2.3.3.3 Self-Assessment
Written Assessment
1. A central processing unit (CPU) consists of two main parts:
a. Control unit and arithmetic logic unit.
b. Control unit and RAM.
c. Motherboard and arithmetic logic unit.
d. Control unit and motherboard.
2. The CPU control unit is responsible for
a. obtaining instructions
b. interpreting instructions
c. all logic functions
d. both A and B
3. DMA module can communicate with the CPU through
a. Interrupt
b. Cycle stealing
c. Branch instruction
d. None of the above
4. The ALU of a computer
a. Can perform addition, subtraction
b. Perform all types of arithmetic operation
c. Can perform AND OR and Multiplication
d. Contains number of counters
5. CPU gets the address of next instruction to be processed from
a. Instruction register
b. Memory address register
c. Index register
d. Program counter
6. Which one of the following devices is referred to as the „brain‟ of the computer system?
a. CPU
b. CD-Rom
c. Mouse
d. Scanner
7. What is the other name for the Mother board
a. System processor
b. System platform
c. System unit
d. System board
8. What makes the computer to be an „electronic‟ machine?
a. It works using electricity
b. It works without moving parts
c. It has a CPU
d. It has moving parts
9. What is the name given to devices designed to protect the computer from static
electricity?
a. Anti-static devices
b. Power surge protectors
c. Personal equipment
d. Computer Hardware
Oral Assessment
Describe the role of buses.
Practical Assessment
Identify the following CPU specifications from your computer
Clock Speed
Manufacturer
Generation
2.3.3.5 References
1. https://www.geeksforgeeks.org/computer-organization-and-architecture-tutorials/
2. https://tutorialspoint.dev/computer-science/computer-organization-and-architecture
2.3.4 Learning Outcome 3: Understand Computer Memory Organization
2.3.4.1 Learning Activities
Introduction
This learning outcome covers explaining memory organisation, various storage technologies,
cache and virtual memory, prescribing memory specifications for a user and verifying memory
specifications for a given computer.
Cached memory
○ a small-sized type of volatile computer memory that provides high-speed
data access to a processor and stores frequently used computer programs,
applications and data
Volatile Memory: This loses its data, when power is switched off.
Non-Volatile Memory: This is a permanent storage and does not lose any data
when power is switched off.
The total memory capacity of a computer can be visualized by hierarchy of components. The
memory hierarchy system consists of all storage devices contained in a computer system from
the slow Auxiliary Memory to fast Main Memory and to smaller Cache memory.
Cache deals with the tags so as to identify which block of main memory is present in each
cache slot
Advantages
The advantages of cache memory are as follows −
● Cache memory is faster than main memory.
● It consumes less access time as compared to main memory.
● It stores the program that can be executed within a short period of time.
● It stores data for temporary use.
Disadvantages
The disadvantages of cache memory are as follows −
● Cache memory has limited capacity.
● It is very expensive.
Types of RAM:-
● Static RAM (SRAM)
● Dynamic RAM (DRAM)
NVRAM:
❏ It is a category of Random Access Memory (RAM) that retains stored data even if
the power is switched off.
❏ NVRAM uses a tiny 24-pin dual inline package (DIP) integrated circuit chip,
which helps it to gain the power required to function from the CMOS battery on
the motherboard.
❏ NVRAM monitors several system parameters, such as Ethernet the MAC address,
serial number, date of manufacture, HOSTID, etc.
❏ NVRAM is a non-volatile memory type that provides the random access facility.
ROM chips are not only used in the computer but also in other electronic items like washing
machine and microwave oven.
Secondary Memory
This type of memory is also known as external memory or non-volatile.
It is slower than the main memory. These are used for storing data/information permanently.
The CPU does not directly access these memories; instead they are accessed via input-output
routines. The contents of secondary memories are first transferred to the main memory, and then
the CPU can access it. For example, disk, CD-ROM, DVD, etc.
Nature The primary memory is categorized The secondary memory is always a non-
as volatile & nonvolatile memories. volatile memory.
Alias These memories are also called Secondary memory is known as a Backup
internal memory. memory or Additional memory or Auxiliary
memory.
Access Data is directly accessed by the Data cannot be accessed directly by the
processing unit. processor. It is first copied from secondary
memory to primary memory. Only then
CPU can access it.
Formation It's a volatile memory meaning data It's a non-volatile memory so that that data
cannot be retained in case of power can be retained even after power failure.
failure.
Storage It holds data or information that is It stores a substantial amount of data and
currently being used by the information. Capacity is generally from
processing unit. Capacity is usually 200GB to terabytes.
in 16 to 32 GB
Expense Primary memory is costlier than Secondary memory is cheaper than primary
secondary memory. memory.
Storage Devices
Form-factors and protocols such as SATA and SAS of traditional hard disk drive (HDD) may
be used by SSD, greatly simplifying usage of SSDs in computers.
New form factors such as the M.2 form factor, and new I/O protocols such as NVM Express
have been developed to address specific requirements of the Flash memory technology used in
SSDs.
Characteristics
● There are no moving mechanical components in SSD. This makes them
different from conventional electromechanical drives such as hard disk drives
(HDDs) or floppy disks, which contain movable read/write heads and spinning
disks.
● SSDs are typically more resistant to physical shock.
● Run silently, have quicker access time and lower latency compared to
electromechanical devices.
Optical storage devices save data as patterns of dots that can be read using light. A laser
beam is the usual light source.
The data on the storage medium is read by bouncing the laser beam off the surface of the
medium.
Dots can be created using the laser beam (for media that is writable such as CD-Rs). The
beam is used in a high-power mode to actually mark the surface of the medium, making a dot.
This process is known as „burning‟ data onto a disc.
Magnetic Storage Device
A magnetic disk is a storage device that uses a magnetization process to write, rewrite and
access data. It is covered with a magnetic coating and stores data in the form of tracks, spots
and sectors. Hard disks and zip disks are common examples of magnetic disks.
Virtual Memory
Virtual Memory is a technique to increase the main memory capacity. It uses data swap
technology and hard disk area is used as virtual memory.
It is a technique that is implemented using both hardware and software. It maps memory
addresses used by a program, called virtual addresses, into physical addresses in computer
memory.
Following are the important differences between Cache Memory and Virtual Memory.
DIMMs with fewer pins are typically smaller, with more pins meaning a physically larger
module. DIMMs are commonly used in desktop computers, whereas laptops typically use Small
Outline Dual Inline Memory Modules (SODIMMs). SODIMMs use the same technology but
they're physically smaller, allowing them to fit in laptops.
Amount of memory
The amount is another important specification to remember. Your computer can only hold so
much RAM and while going over the specified limit won't harm your computer, your PC will
only use as much of it as it was designed to use. Amount is commonly measured in gigabytes
(GB), though older or low-end computers may measure maximum RAM in megabytes (MB).
Some computers have two slots to install memory, others have four and some have even more.
Type of memory
The memory type is important because this is where the majority of RAM's compatibility issues
lie. Multiple variations of Double Data Rate (DDR) memory technology are used in various
computers.
DDR2 is faster than DDR memory, while DDR3 memory is faster than both. If your computer
requires DDR3 memory, DDR2 memory won't work.
Memory Speed
Memory speed is frequently denoted by "PC-" followed by a number that denotes the peak
transfer rate and bandwidth of that type of memory. For example, PC-2400's peak transfer rate is
around 2,400 megabytes per second (MB/s). The peak transfer rate basically denotes the best
performance possible for that memory. "PC2" and "PC3" simply refer to DDR2 and DDR3
memory, respectively.
The specifications may list the memory under a name known as the "friendly name," which looks
something like "DDR3-1066." In this case, 1066 represents the data transfer rate in millions per
second. All together, the memory specification may read something like "2 GB PC3-6400 DDR3
SODIMM."
Note: For hard disk storage, the capacity, usually in Gigabytes is the key factor to consider.
Conclusion
At the end of this learning outcome, the learner should be able to explain memory
organisation, various storage technologies, cache and virtual memory, prescribe memory
specifications for a user and verify memory specifications for a given computer.
Further Reading
1. https://www.tutorialspoint.com/computer_logical_organization/index.htm
2. https://www.javatpoint.com/computer-organization-and-architecture-tutorial
2.3.4.3 Self-Assessment
Written Assessment
1. Cache memory is used in a computer system to
a. Ensure fast booting
b. Replace static memory
c. Replace hard disk
d. Speed up memory access
2. Virtual memory of a computer system may be
a. Of unlimited size.
b. As big as maximum addressing capability of the computer system.
c. Of size equivalent to total capacity of secondary storage plus size of
RAM.
d. None of the above
3. Which of the following is not an advantage of Dynamic RAMs
a. High density
b. Low cost
c. High speed
d. No need of memory refresh
4. In the memory hierarchy the fastest memory
a. SRAM
b. Cache
c. Registers
d. DRAM
5. Cache memory is implemented using
a. Dynamic RAM
b. Static RAM
c. PROM
d. EPROM
6. Which one of the following is the odd one out?
a. Primary memory
b. Secondary memory
c. Tertiary memory
d. Cached memory
7. What makes SSD different from conventional electromechanical drives
a. they contain movable read/write heads
b. they have spinning disks
c. They do not have moving mechanical components
d. They are hard Disks
8. Which of the following Disks are more resistant to physical shock
a. SSDs
b. Floppy Disks
c. HDDs
d. None of the above
9. The following are all types of secondary memory except.
a. Hard drive
b. RAM
c. SSD
d. Flash
10. Which one of the following statements is true?
a. Primary memory is the main memory of the computer system.
b. Rom is part of the secondary memory
c. Secondary memory is not useful at all to the computer
d. Secondary memory is also called internal memory.
Oral Assessment
1. Describe DRAM
2. Differentiate between cache and virtual memory
Practical Assessment
1. Verify the memory and hard disk specifications of the computer provided.
2. Prescribe memory specifications for a user intending to install and use video and
graphics production software.
2.3.4.5 References
1. https://www.geeksforgeeks.org/computer-organization-and-architecture-tutorials/
2. https://tutorialspoint.dev/computer-science/computer-organization-and-architecture
3. https://www.techwalla.com/articles/random-access-memory-specifications
2.3.5 Learning Outcome 4: Understand Input-Output functions
2.3.5.1 Learning Activities
Introduction
This learning outcome covers the explaining categorizing the peripheral devices, explain
Input/output (I/O) processing, explain bus interface role in I/O and different modes of data
transfer. It also involves prescribing I/O specifications for a user and verifying I/O
specifications for a given computer.
Bus: A bus is a subsystem that transfers data between computer components inside a
computer or between computers
Categories
We have different categories. These include;
● Input
● Output
● storage
Input Devices
A device that feeds data into a computer processor is called an input device.
Input can take a variety of forms, from commands you enter from the keyboard to data from
another computer or device.
Output Devices
A device that shows data from a computer processor is an output device.
Output can also appear in a variety of forms - text, video, graphics, and so on.
These devices allow the user to save data in a more permanent way than RAM so that data is
not lost and may be used at a later time.
Peripheral specifications
These specifications should match the user‟s needs. If the user needs to save/store data, they
will need storage, a device categorized as storage will be ideal.
The user specification may entail a very long list of devices depending on the special purpose
at hand.
I/O Processing
I/O processor is a processor separate from the CPU designed to handle only input/output
processes for a device or the computer.
The I/O processor is capable of performing actions without interruption or intervention from
the CPU. The CPU only needs to initiate the I/O processor by telling it what activity to
perform. Once the necessary actions are performed, the I/O processor then provides the results
to the CPU.
Doing these actions allow the I/O processor to act as a bus to the CPU, carrying out activities
by directly interacting with memory and other devices in the computer. A more advanced I/O
processor may also have memory built into it, allowing it to perform actions and activities
more quickly.
BUS: is a communication system that transfers data between components inside a computer, or
between computers
Interface: is a hardware circuitry between the microcomputer and the I/O devices. It provides
all the input/output transfer.
They connect/interface the computer and the peripherals.
Figure 15:Connection of I/O bus to I/O device
Types of buses
Each bus defines its set of connectors to physically plug devices, cards or cables together. There
are two types of buses: internal and external. Internal buses are connections to various internal
components. External buses are connections to various external components. There are different
kinds of slots that internal and external devices can connect to.
Internal
Types of Slots
There are many different kinds of internal buses, but only a handful of popular ones. Different
computers come with different kinds and number of slots. It is important to know what kind
and number of slots you have on your computer before you go out and by a card that matches
up to a slot you don‟t have.
PCI
PCI (Peripheral Component Interconnect) is common in modern PCs. This kind of bus is being
succeeded by PCI Express. Typical PCI cards used in PCs include: network cards, sound cards,
modems, extra ports such as USB or serial, TV tuner cards and disk controllers. Video cards
have outgrown the capabilities of PCI because of their higher bandwidth requirements.
PCI Express
PCI Express was introduced by Intel in 2004. It was designed to replace the general-purpose
PCI expansion bus and the AGP graphics card interface.
PCI express is not a bus but instead a point-to-point connection of serial links called lanes. PCI
Express cards have faster bandwidth then PCI cards which make them more ideal for high-end
video cards.
PCMCIA
PCMCIA (also referred to as PC Card) is the type of bus used for laptop computers. The name
PCMCIA comes from the group who developed the standard: Personal Computer Memory
Card International Association.
PCMCIA was originally designed for computer memory expansion, but the existence of a
usable general standard for notebook peripherals led to many kinds of devices being made
available in this form. Typical devices include network cards, modems, and hard disks.
AGP
AGP (Accelerated Graphics Port) is a high-speed point-to-point channel for attaching a
graphics card to a computer‟s motherboard, primarily to assist in the acceleration of 3D
computer graphics. AGP has been replaced over the past couple years by PCI Express. AGP
cards and motherboards are still available to buy, but they are becoming less common.
Types of Cards
Video Card
A video card (also known as graphics card) is an expansion card whose function is to generate
and output images to a display. Some video cards offer added functions, such as video capture,
TV tuner adapter, ability to connect multiple monitors, and others. Most video cards all share
similar components.
They include a graphics processing unit (GPU) which is a dedicated microprocessor optimized
for 3D graphics rendering. It also includes video BIOS that contains the basic program that
governs the video card‟s operations and provides the instructions that allow the computer and
software to interface with the card. If the video card is integrated in the motherboard, it may
use the computer RAM memory. If not, it will have its own video memory called Video RAM.
This kind of memory can range from 128MB to 2GB. A video card also has a RAMDAC
(Random Access Memory Digital-to-Analog Converter) which takes responsibility for turning
the digital signals produced by the computer processor into an analog signal which can be
understood by the computer display. Lastly, they all have outputs such as an HD-15 connector
(standard monitor cable), DVI connector, S-Video, composite video or component video.
Sound Card
A sound card is an expansion card that facilitates the input and output of audio signals to/from
a computer under control of computer programs. Typical uses for sound cards include
providing the audio component for multimedia applications such as music composition, editing
video or audio, presentation/education, and entertainment. Many computers have sound
capabilities built in, while others require additional expansion cards to provide for audio
capability.
Network Card
A network card is an expansion card that allows computers to communicate over a computer
network. It allows users to connect to each other either by using cables or wirelessly. Although
other network technologies exist, Ethernet has achieved near-ubiquity for a while now. Every
Ethernet network card has a unique 48-bit serial number called a MAC address, which is
stored in ROM carried on the card.
External
Types of Connections
USB
USB (Universal Serial Bus) is a serial bus standard to interface devices. USB was designed to
allow many peripherals to be connected using a single standardized interface socket and to
improve the plug-and-play capabilities by allowing devices to be connected and disconnected
without rebooting the computer.
Other convenient features include providing power to low-consumption devices without the
need for an external power supply and allowing many devices to be used without requiring
manufacturer specific, individual device drivers to be installed. USB is by far the dominating
bus for connecting external devices to your computer.
Firewire
Firewire (technically known as IEEE 1394 and also known as i.LINK for Sony) is a serial bus
interface standard for high-speed communications and isochronous real-time data transfer,
frequently used in a personal computer. Firewire has replaced Parallel ports in many
applications. It has been adopted as the High Definition Audio-Video Network Alliance
(HANA) standard connection interface for A/V (audio/visual) component communication and
control. Almost all modern digital camcorders have included this connection.
PS/2
The PS/2 connector is used for connecting some keyboards and mice to a PC compatible
computer system. The keyboard and mouse interfaces are electrically similar with the main
difference being that open collector outputs are required on both ends of the keyboard interface
to allow bidirectional communication. If a PS/2 mouse is connected to a PS/2 keyboard port,
the mouse may not be recognized by the computer depending on configuration.
Programmed I/O
Programmable I/O is one of the I/O techniques other than the interrupt-driven I/O and direct
memory access (DMA). The programmed I/O is the simplest type of I/O technique for the
exchanges of data or any types of communication between the processor and the external
devices. With programmed I/O, data is exchanged between the processor and the I/O module.
The processor executes a program that gives it direct control of the I/O operation, including
sensing device status, sending a read or write command, and transferring the data. When the
processor issues a command to the I/O module, it must wait until the I/O operation is
complete. If the processor is faster than the I/O module, this is wasteful of processor time.
To execute an I/O-related instruction, the processor issues an address, specifying the particular
I/O module and external device, and an I/O command. There are four types of I/O commands
that an I/O module may receive when it is addressed by a processor:
● Control: Used to activate a peripheral and tell it what to do. For example, a magnetic-
tape unit may be instructed to rewind or to move forward one record. These commands
are tailored to the particular type of peripheral device.
● Test: Used to test various status conditions associated with an I/O module and its
peripherals. The processor will want to know that the peripheral of interest is powered on
and available for use. It will also want to know if the most recent I/O operation is
completed and if any errors occurred.
● Read: Causes the I/O module to obtain an item of data from the peripheral and place it in
an internal buffer. The processor can then obtain the data item by requesting that the I/O
module place it on the data bus.
● Write: Causes the I/O module to take an item of data (byte or word) from the data bus
and subsequently transmit that data item to the peripheral.
Relative to the total interrupt system, the processors enter an interrupt service routine. The
function of the routine will depend upon the system of interrupt levels and priorities that is
implemented in the processor. The interrupt technique requires more complex hardware and
software, but makes far more efficient use of the computer‟s time and capacities.
Figure 24:Interrupt- initiated I/O
For input, the device interrupts the CPU when new data has arrived and is ready to be retrieved by
the system processor. The actual actions to perform depend on whether the device uses I/O ports or
memory mapping.
For output, the device delivers an interrupt either when it is ready to accept new data or to
acknowledge a successful data transfer. Memory-mapped and DMA-capable devices usually generate
interrupts to tell the system they are done with the buffer.
Here the CPU works on its given tasks continuously. When an input is available, such as when
someone types a key on the keyboard, then the CPU is interrupted from its work to take care of the
input data. The CPU can work continuously on a task without checking the input devices, allowing
the devices themselves to interrupt it as necessary.
It is a way to improve processor activity and I/O transfer rate by taking-over the job of
transferring data from the processor, and letting the processor do other tasks.
This technique overcomes the drawbacks of other two I/O techniques which are the time
consuming process when issuing command for data transfer and tie-up the processor in data
transfer while the data processing is neglected. It is more efficient to use the DMA method
when large volumes of data has to be transferred.
For DMA to be implemented, the processor has to share its‟ system bus with the DMA
module. Therefore, the DMA module must use the bus only when the processor does not need
it, or it must force the processor to suspend operation temporarily. The latter technique is more
common to be used and it is referred to as cycle stealing.
After the information is sent, the processor continues with other work. The DMA module then
transfers the entire block of data directly to or from memory without going through the
processor. When the transfer is complete, the DMA module sends an interrupt signal to the
processor to inform that it has finished using the system bus.
Further Reading
1. https://www.tutorialspoint.com/computer_fundamentals/computer_input_devices.htm
2. https://www.tutorialspoint.com/computer_fundamentals/computer_hardware.htm
Conclusion
At the end of this learning outcome, the learner should be able to explain and categorizing the
peripheral devices, explain Input/output (I/O) processing, explain the bus interface role in I/O
and different modes of data transfer. The learner should also able to prescribe I/O
specifications for a user and verify I/O specifications for a given computer.
6.3.5.3 Self-Assessment
Written Assessment
1. What is a peripheral device?
2. What is the purpose of the Bus Interface Unit?
3. Which specifications are important for a monitor?
4. How is an interrupt processed?
5. What type of devices are computer speakers or headphones?
a. Input
b. Input/output
c. Software
d. Output
Oral Assessment
1. Distinguish between programmed and Interrupt driven I/O.
2. How does DMA process I/O requests?
Practical Assessment
1. Verify the various I/O ports in your PC.
2. Confirm the specifications of the I/O devices attached to your computer.
6.3.5.4 Tools, Equipment, Supplies and Materials
● Computer
● Internet connectivity
● Stationery
● Instruction material
6.3.5.5 References
1. http://openbookproject.net/courses/intro2ict/hardware/peripherals.html
2. https://www.tutorialspoint.com/computer_fundamentals/computer_components.htm
2.3.6.2 Information Sheet No. 2/LO5: Understand computer arithmetic and logic
Introduction
This learning outcome involves explaining number systems, demonstrating Integer and
floating point representations according to IEEE standard, explaining integer and floating
point arithmetic, logic operators and logic operations and demonstrating methods of
representing logic operations.
Say we have three numbers – 734, 971 and 207. The value of 7 in all three numbers is different−
● In 734, value of 7 is 7 hundreds or 700 or 7 × 100 or 7 × 102
● In 971, value of 7 is 7 tens or 70 or 7 × 10 or 7 × 101
● In 207, value 0f 7 is 7 units or 7 or 7 × 1 or 7 × 100
In any binary number, the rightmost digit is called least significant bit (LSB) and leftmost digit
is called most significant bit (MSB).
Computer memory is measured in terms of how many bits it can store. Here is a chart for
memory capacity conversion.
● 1 byte (B) = 8 bits
● 1 Kilobytes (KB) = 1024 bytes
● 1 Megabyte (MB) = 1024 KB
● 1 Gigabyte (GB) = 1024 MB
● 1 Terabyte (TB) = 1024 GB
● 1 Exabyte (EB) = 1024 PB
● 1 Zettabyte = 1024 EB
● 1 Yottabyte (YB) = 1024 ZB
Decimal equivalent of any octal number is the sum of the product of each digit with its
positional value.
7268 = 7×82 + 2×81 + 6×80
= 448 + 16 + 6
= 47010
0 0 0 0000
1 1 1 0001
2 2 2 0010
3 3 3 0011
A 10 12 1010
B 11 13 1011
C 12 14 1100
ASCII
Besides numerical data, computers must be able to handle alphabets, punctuation marks,
mathematical operators, special symbols, etc. that form the complete character set of English
language. The complete set of characters or symbols are called alphanumeric codes. The
complete alphanumeric code typically includes –
● 26 upper case letters
● 26 lower case letters
● 10 digits
● 7 punctuation marks
● 20 to 40 special characters
Now a computer understands only numeric values, whatever the number system used. So all
characters must have a numeric equivalent called the alphanumeric code. The most widely used
alphanumeric code is American Standard Code for Information Interchange (ASCII). ASCII is a
7-bit code that has 128 (27) possible codes.
Table 6: ASCII
Unicode
Unicode is an international coding system designed to be used with different language scripts.
Each character or symbol is assigned a unique numeric value, largely within the framework of
ASCII. Earlier, each script had its own encoding system, which could conflict with each other.
In contrast, this is what Unicode officially aims to do − Unicode provides a unique number for
every character, no matter what the platform, no matter what the program, no matter what the
language.
Decimal to Binary
Decimal numbers can be converted to binary by repeated division of the number by 2 while
recording the remainder.
Example:
The remainders are to be read from bottom to top to obtain the binary equivalent.
4310 = 1010112
Decimal to Octal
Decimal numbers can be converted to octal by repeated division of the number by 8 while
recording the remainder.
Example:
Decimal to Hexadecimal
Decimal numbers can be converted to octal by repeated division of the number by 16 while
recording the remainder.
Example:
Example:
101100101012 = 26258
To convert an octal number to binary, each octal digit is converted to its 3-bit binary equivalent
according to this table.
Example:
Octal Digit 0 1 2 3 4 5 6 7
Binary Equivalent 00 00 01 01 10 10 11 11
0 1 0 1 0 1 0 1
546738 = 1011001101110112
Binary to Hexadecimal
To convert a binary number to hexadecimal number, these steps are followed −
● Starting from the least significant bit, make groups of four bits.
● If there is one or two bits less in making the groups, 0s can be added after the most
significant bit.
● Convert each group into its equivalent octal number.
Example:
101101101012 = DB516
To convert an octal number to binary, each octal digit is converted to its 3-bit binary equivalent.
Integers
An integer is a whole number (not a fraction) that can be positive, negative, or zero.
Therefore, the numbers 10, 0, -25, and 5,148 are all integers.
Integers are a commonly used data type in computer programming. For example, whenever a
number is being incremented, such as within a "for loop" or "while loop," an integer is used.
Integers are also used to determine an item's location within an array.
When two integers are added, subtracted, or multiplied, the result is also an integer. However,
when one integer is divided into another, the result may be an integer or a fraction. For
example, 6 divided by 3 equals 2, which is an integer, but 6 divided by 4 equals 1.5, which
contains a fraction. Decimal numbers may either be rounded or truncated to produce an integer
result.
Computers recognize real numbers that contain fractions as floating point numbers. When a
calculation includes a floating point number, it is called a "floating point calculation." Older
computers used to have a separate floating point unit (FPU) that handled these calculations,
but now the FPU is typically built into the computer's CPU.
Addition
Example on decimal value given in scientific notation:
3.25 x 10 ** 3
+ 2.63 x 10 ** -1
-----------------
First step: Align decimal points
3.25 x 10 ** 3
+ 0.000263 x 10 ** 3
--------------------
3.250263 x 10 ** 3
(Presumes use of infinite precision, without regard for accuracy)
We want to shift the mantissa right, because the bits that fall off the end should come from
the least significant end of the mantissa
-> Choose to shift the .25, since we want to increase its exponent.
-> Shift by 10000101
-01111101
---------
00001000 (8) places.
Step 2: Add (don't forget the hidden bit for the 100)
0 10000101 1.10010000000000000000000 (100)
+ 0 10000101 0.00000001000000000000000 (.25)
---------------------------------------
0 10000101 1.10010001000000000000000
Step 3: normalize the result (get the "hidden bit" to be a 1)
It already is for this example.
The result is
0 10000101 10010001000000000000000
Subtraction
Like addition as far as alignment of radix points then the algorithm for subtraction of sign mag.
numbers takes over.
Multiplication
Example on decimal values given in scientific notation:
3.0 x 10 ** 1
+ 0.5 x 10 ** 2
-----------------
Add exponents: Always add true exponents (otherwise the bias gets added in twice)
Biased:
10000100
+ 00111100
----------
10000100 01111111 (switch the order of the subtraction,
- 01111111 - 00111100 so that we can get a negative value)
---------- ----------
00000101 01000011
true exp true exp
is 5. is -67
Add true exponents 5 + (-67) is -62.
Re-bias exponent: -62 + 127 is 65.
Division
Similar to multiplication.
True division: do unsigned division on the mantissas (don't forget the hidden bit)
Subtract TRUE exponents
The IEEE standard is very specific about how all this is done. Unfortunately, the hardware
to do all this is very slow.
There is a faster way to do division. It‟s called division by reciprocal approximation. It takes
about the same time as a fl. pt. multiply. Unfortunately, the results are not always the same as
with true division.
Rounding
Arithmetic operations on fl. pt. values compute results that cannot be represented in the given
amount of precision. So, we must round results.
There are MANY ways of rounding. They each have "correct" uses, and exist for different
reasons. The goal in a computation is to have the computer round such that the end result is as
"correct" as possible.
Methods of rounding:
Round toward 0 -- also called truncation.
Figure out how many bits (digits) are available. Take that many bits (digits) for the result and
throw away the rest. This has the effect of making the value represented closer to 0.
Example:
.7783 If 3 decimal places available, .778
If 2 decimal places available, .77
Example:
1.23 If 2 decimal places, 1.3
-2.86 if 2 decimal places, -2.8
Example:
1.23 If 2 decimal places, 1.2
-2.86 if 2 decimal places, -2.9
ODD CASE:
If there is anything other than 1000 to the right of the number of digits to be kept, it is
rounded in IEEE standard such that the least significant bit (to be kept) is a zero.
1.1111
|
1.11 | 10.00
------
1.1101
|
1.11 | 10.00
------
1.001 (ODD CASE)
|
1.00 | 1.01
-----
-1.1101 (1/4 of the way between)
|
-10.00 | -1.11
------
-1.001 (ODD CASE)
|
-1.01 | -1.00
-----
Integer Representation and Arithmetic
Integer Representation
● Bit-- Binary Digit
○ 1 byte = 8 bits
○ 1 word = 2 bytes
● Integer takes up two bytes; can be signed or unsigned.
Unsigned Integers
● Can represent whole numbers from 0 to 65,535
○ (0 to 216 - 1).
● In binary, this is from
○ 02to 11111111111111112
● Internally, binary representation of decimal value is 16 bits.
Signed Integers
● Need to reserve one bit for the sign.
● Three ways:
○ Sign-Magnitude
○ 1's Complement
○ 2's Complement
Sign-Magnitude
● Uses the most significant bit of the word to represent the sign.
○ 0 - Positive
○ 1 - Negative.
● Rest of the number is encoded in magnitude part
37 = 00000000 00100101
-37 = 10000000 00100101
6712 = 00011010 00111000
-6712 = 10011010 00111000
● Can represent numbers from -32,767 to 32,767.
○ -215+1 .. 215-1
● But, two representations for zero:
0 = 00000000 00000000
● -0 = 10000000 00000000 Arithmetic can be cumbersome.
1's Complement
● Negative numbers are stored as bitwise complement of corresponding positive numbers.
● Leftmost bit of the positive number is 0. That of the negative number is 1.
196 = 00000000 11000100
-196 = 11111111 00111011
● Can represent numbers from -32,767 to 32,767.
○ -215+1 .. 215-1
● Arithmetic is easier than sign-magnitude.
● But, still have two representations for zero:
0 = 00000000 00000000
-0 = 11111111 11111111
2's Complement
● Modern Method: Positive number represented in same way as other two methods
● Negative number obtained by taking 1's Complement of positive number and adding 1.
6713 = 00011000 00011101
1's Comp = 11100111 11100010
2's Comp = 11100111 11100011
● Word integers can represent numbers from -32,768 to 32,767.
○ -215 .. 215-1
● Byte integers can represent numbers from -128 to 127.
○ -27 .. 27-1
● One version of zero:
00000000 00000000
We have a range of the logic operators which include OR, AND, NOT, NOR, XOR and
XNOR.
OR
The OR logic operation returns True if either its inputs are True. If all inputs are false, the
output is also false. In computer programming, the OR operation is usually written as || (two
vertical bars). In Boolean algebra, the OR value of two inputs A and B can be written as A+B.
Note Do not mistake the OR operation for arithmetic addition, even though they both use the
"+" symbol. They are distinct operations.
OR logic gate
AND
The AND logic operation returns True only if either of its inputs are True. If either of the
inputs is False the output is also false. In computer programming, the AND operation is
usually written as && (two ampersands). In Boolean algebra, the AND operation of two
inputs A and B can be written as AB.
OR logic gate
NOT
The NOT logic operation returns True if its input is False, and False if its input is True. In
computer programming, the NOT operation is usually written as ! (an exclamation mark). In
Boolean algebra, the NOT value of an input A can be written as (A with an overscore).
XOR
The XOR logic operation (which stands for "Exclusive OR" returns true if either of its inputs
differ, and false if they are all the same. In other words, if its inputs are a combination of true
and false, the output of XOR is true. If its inputs are all true or all false, the output of XOR is
false. In Boolean algebra, the XOR value of two inputs A and B can be written as A⊕B (the
XOR symbol, resembles a plus sign inside a circle).
Exclusive OR gate
XNOR
The XNOR logic operation (which stands for "Exclusive NOT OR" returns true if either of its
inputs are the same, and false if either of them differ. In other words, if its inputs are a
combination of true and false, the output of XNOR is false. If its inputs are all true or all false,
the output of XNOR is true. In Boolean algebra, the XNOR value of two inputs A and B can
be written as (the XOR symbol ⊕, resembles a plus sign inside a circle with a line over
everything).
Below is the XNOR operation circuit diagram.
Karnaugh map
A Karnaugh map provides a pictorial method of grouping together expressions with common
factors and therefore eliminating unwanted variables. The Karnaugh map can also be described
as a special arrangement of a truth table.
The diagram below illustrates the correspondence between the Karnaugh map and the truth
table for the general case of a two variable problem.
The values inside the squares are copied from the output column of the truth table, therefore
there is one square in the map for every row in the truth table. Around the edge of the
Karnaugh map are the values of the two input variable. A is along the top and B is down the
left hand side. The diagram below explains this:
The values around the edge of the map can be thought of as coordinates. So as an example, the
square on the top right hand corner of the map in the above diagram has coordinates A=1 and
B=0. This square corresponds to the row in the truth table where A=1 and B=0 and F=1. Note
that the value in the F column represents a particular function to which the Karnaugh map
corresponds.
Conclusion
At the end of this learning outcome, the learner should be able to explain number systems,
demonstrate integer and floating point representations according to IEEE standard explain
integer and floating point arithmetic, logic operators and logic operations and demonstrate
methods of representing logic operations.
Further Reading
1. https://www.tutorialspoint.com/fixed-point-and-floating-point-number-representations
2. https://www.tutorialspoint.com/computer_logical_organization/boolean_algebra.htm
2.3.6.3 Self-Assessment
Written Assessment
1. Which of the following is not a logical operator?
a. And
b. OR
c. Else
d. NOT
2. Boolean operator which combines search terms so that each search result contains all of
terms, is
a. and operator
b. not operator
c. or operator
d. nor operator
3. The sign magnitude representation of -1 is?
a. 1001
b. 1000
c. 0001
d. 1110
4. The ALU gives the output of the operations and the output is stored in the?
a. Memory devices
b. Registers
c. Flags
d. Output Unit
5. The bitwise complement of 0 is?
a. 00000001
b. 11111111
c. 11111110
d. 10000000
Oral Assessment
1. Describe the logical operators
2. Describe with illustrations how to convert Decimal to binary
Practical Assessment
Research on the application areas of logic operations in computer science.
2.3.2.5 References
1. http://mathworld.wolfram.com/KarnaughMap.html
2. https://www.tutorialspoint.com/computer_logical_organization/boolean_algebra.htm
3. https://www.tutorialspoint.com/digital_circuits/digital_circuits_boolean_algebra.htm