1. Bachelor of Science in Information Technology
Semester 2 BT0068 –
Computer Organization and Architecture
Name: Muhama mark
Roll No. 1210000081
Qn1. convert the following binary numbers to octal
a) 101110
Soln:
00101110octal (base 8)
000 101110
↑ ↑ ↑
0 5 6
b) 111010101
Soln:
111010101octal (base 8)
111010101
↑ ↑ ↑
7 2 5
c) 110110100
Soln:
110110100octal (base 8)
110 110100
↑ ↑ ↑
6 6 4
d) 101010100
Soln:
101010100octal (base 8)
101 010100
↑ ↑ ↑
5 2 4
2. e) 110010
Soln:
000110010octal (base 8)
000 110010
↑ ↑ ↑
0 6 2
Qn 2. Explain CPU module and types of transfers between different modules
CPU refers to central processing unit which is the brain of a computer system. A central
processing unit is made up of other components in it such as the arithmetic logical unit that does
all the calculations, registers that isthe fastest storage in the computer system and are used for
storage of instructions for easy and quick access by the processor among others.A Central
processing unit module is one of the three modules known in a computer others being memory
and I/O modules. There are several inputs and outputs for a Central processing unit model.
Among the inputs we have instructions, data and interrupt signals that interfere with the
processing of data. Address, data and control signal are the expected outputs of a Central
processing unit model. The instructions and data are read by the Central processing unit and it
writes out data after processing. The Central processing unit is in charge or control of any
operation of the system by using several control signals. The central processing unit also receives
interrupt signals and appropriate actions to be taken in outputs data as well as control signals.
Transfer between modules means moving information between the central processing unit,
memory and input output modules. We have two types of transfers between these modules and
are classified in the following ways; one depending on the devices that are to be interconnected
and the other depending on whether it carries information of one bit or several bits. The
following are the different types of transfers between different modules.
Input output to central processing unit: In this transfer, the processor reads data from an
input/output device via an input/output module.
Central processing unit to input/output: this is basically the opposite of Input output to central
processing unit transfer in that here the processor sends data to the input/output device.
Memory to central processing unit: the central processing unit reads an instruction or unit of data
from the memory.
Central processing unit to memory: this is a transfer where the central processing unit writes a
unit of data to memory
Memory to input/output or input/output to memory: in this scenario an input/output module
is allowed to communicate directly with the memory without passing through the Central
processing unit module and this is done by using Direct Memory Access
3. 3. Explain the functional units of a basic computer with a neat diagram.
A computer is a device or machine programmed using software’s to do a specific work
that humans used to find hard to do or required much of their energy and brains hence they
simplified the work of humans.
A computer is made up of basically 4 functional components and these include central
processing unit made up of the processor, arithmetic logical unit and the control unit, memory,
input / output and a bus for carrying signals or data within the computer system.
A diagram showing the functional units of a basic computer.
I/O interface CPU
Bus
Central processing unit (CPU). This is referred to as the heart of a computer system. This is the
entity that controls the operation of the computer and performs its data processing functions. It is
usually referred to as a processor. The components of the CPU are ALU and control unit.
Arithmetic logic unit
All arithmetic calculations and logical calculation are control or carried out by the
arithmetic logic unit.
Control unit
The main function of the control unit is to control all the functions of the computer system
which include which data to go in, how it is acted upon and where it goes after and any other
function of a computer.
System interconnection. This constitutes some mechanism that provide for communication
among central processing unit, memory and input/ output. These can be referred to as system
bus. A bus is a path that data takes from the source to reach its final destination.
Memory. Memory is used to store data or instructions, as well as the result after computation has
occurred. Memory unit is an integral part of computer system. The main function of computer is
to store instructions needed by the central processing unit or system. There’s main memory
which is volatile
ProcessorInterface
CRT
Input
Network
Output
Memory
ALU
Control
Disk
Keyboard
dddd
4. Input / Output interface
They are used to move data from the computer and from its external environment. The external
environment may be an input / an output device.
Input devices. These are used to feed data into the computer and such devices include keyboard,
mouse, and scanner.
Output devices. These are peripherals used to output or display data to the user and include
devices like monitor to display, printer among others
4. Explain data transfer and arithmetic operations
Data transfer is the transfer of data in a computer system source to destination. It is the most
fundamental type of machine instruction. Before data transfer takes place, the following have to
be specified.
The length of the data to be transferred
The source and destination location each can be a register or stack or memory,
The mode of addressing for each operand in the computer system.
The operation of data transfer is internal of the CPU if and only if both operands are in the CPU
registers, the CPU causes data to be transferred from one register to another but if it is external,
one or both operands are in memory ,then the following should be done.
Calculate the memory address based on the address mode.
If the address refers to virtual memory, translate from virtual to actual memory address.
Determine whether addressed item in in cache and if not issue command to memory module.
Some below are the commands entered or carried out during the data transfer action.
Move; this is basically moving data from one place to another say from register A to register B.
this means carrying what was in register A and putting it in Register B.
Store; this command is carried after data has been worked upon and the results needs an address
it can be kept in.
Load can also refer to fetching data or instruction from some place in a computer system, may
be from memory to CPU.
Clear; clear can also be known as reset, this instruction resets the values of the operands.
Push; this refers to instructions of a stack which is a LIFO. The command is used for inserting in
new data at the top of the stack. It first checks if the stack is full or empty, if space is available
for new data then a push operation is carried out.
Pop is a stack function that deletes data from the top of the stack in a computer system.
Exchange and set
More so we do have arithmetic operations in the computer system computationsand most
systems make available to us basic arithmetic functions like subtract, multiply, addition and
division. They are also provided for signed integer numbers and are too provided for floating
point and packed decimal numbers often.
5. Absolute is another operand in arithmetic operations which takes the absolute value of the
operand, and more so decrement which decrements the value of the operand by one, increment
that increments the operand by one and negate which complements the operand.
Qn 5. Explain external devices and give classification of external devices.
External devices. These are devices or hardwareor peripherals that can be added to a
computer to produce quality work.An external device attaches to the computer by a link to an
input/output module. This link is used to exchange control, status and data between the computer
and the external device. Such devices include printers, mouse, monitor, speakers,
keyboard,scanners all of the named are peripherals.
External devices can be classified into the following classesnamely;
Communication interfaces:These are external devices that allow a computer system to
exchange data or information with remote devices or hosts, which may be machine readable or
human interfaces examples being network interface card, modems among others.
Human interfaces:A human interface device or HID is a type of computer device that
interacts directly with, and most often takes input from, humans and may deliver output to
humans or human interfaces are simply peripherals that are used for or suitable for
communicating with the computer user and these external devices are : Keyboards are some of
the most popular USB Human Interface Device class devices. The USB HID class keyboard is
normally designed with an IN endpoint that communicates keystrokes to the computer and an
OUT endpoint that communicates the status of the keyboard's LEDs from the computer to the
keyboard, screen used for displaying the output for user to see and printer used to output
computer readable or soft copy documents onto a hard copy that can be felt.
Machine readable: this class is suitable for communication with the equipment. Magnetic disks
and tape systems, control and monitoring, actuators and sensors which are used in designing
robots by engineers.
6. Explain DMA Function and Operation DMA Configurations.
DMA is completed as Direct Memory Access where by data from a peripheral or external
device like a flask disk or memory stick is allowed permission to access the computer memory
directly without going through the CPU. This is enabled by some bus architecture available in
the system that routes data from the memory to the external device say a flask disk without the
involvement of the CPU thus speeding up the up overall computer operations. A small portion of
memory in the computer system is usually designated as an area to be used for direct memory
access.
When interrupt driven and programmed input/output require active CPU, that’s when the central
processing unit is required and in direct memory access, the transfer is limited.
6. In case a CPU needs to read or write data, it does issue commands to the direct memory access
module and gives information to the direct memory access controller as noted below:
Read/write,
Starting address of the memory block,
Device address,
Data that is needed to be transferred is also noted. As the DMA controller does its work, the CPU
goes on with other tasks. During this time, the DMA controller takes over the CPU work of the
input/output operations and transfers all the block of data one word at a time directly from or to
memory without any CPU intervention.an interrupt is later sent to the CPU after the transfer is
complete. DMA can be configured in the following ways:
DMA using an I/O bus: I/O modules are connected to DMA controller using a separate bus
known as I/O bus. This makes only one I/O interface in the DMA module.This configuration has
certain features like each transfer uses the bus once, this is a DMA to memory, and uses separate
I/O bus among others.
Single bus detached DMA: here all the modules share one system bus. This looks to be
inexpensive but it is clearly inefficient. Features of the single Bus detached include each transfer
uses bus twice, I/O to DMA then DMA to memory, CPU is suspended twice and single bus
detached DMA controller.
Single bus integrated DMA: there’s a path between DMA module and one o more I/O modules
that do not include the system bus. There might be a separate module that controls on or more
I/O modules in this configuration. It has the following features:
Each transfer uses the bus once,
The controller might support more than one device,
CPU is suspended once,
DMA to memory
Single bus integrated DMA controller