Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

COA Unit-1 Notes (P1)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

ASANSOL INSTITUTE OF ENGINEERING AND MANAGEMENT – POLYTECHNIC

ASANSOL

Subject : Computer System Organization


Course Code : CST207

Pre Test:
UNIT-1 (Part-1)

 Structure Of Computer
Computer Functional Units :

A Digital Computer Consists of Five Functional Units :


I. Input Unit
II. Output Unit
III. Memory Unit
IV. Control Unit
V. Arithmetic And Logic Unit

• Input Unit :
Input Unit Mainly Accepts the Information from the Input Devices. Input Unit reads the information that are entered
from the input devices. The most commonly used Input Device is Key Board. What ever the information or the data
which are entered from the keyboard that is read by the Input Unit. Suppose we want to give a Information whenever a
Key “7” is pressed, It is automatically translated into equivalent binary code “0111”. This equivalent binary code is
stored either in the Memory Unit or in the Processor registers that are Exist in Processor.
Example : Mouse, Joystick (These are Graphical Input Devices).

• Output Unit :
Output Unit is used for sending the output results or the processed results to the outside world through the most
commonly used output device, i.e., Monitor or Printer. Whatever the result we are getting after the processing by the
Arithmetic and Logic Unit that results are sent to the Output Unit. That Output Unit can Display the Output results on
the monitor. The Output Unit can send the processed results on a paper through the Printer. The most commonly used
output device is Monitor and Printer. They are displaying the Processed results on the paper.
Example : Monitor, Printer, Speaker.

• Memory Unit :
The most commonly used unit is Memory Unit because whatever the information that is read from the input devices
such as keyboard that information is stored in the Memory Unit. Memory unit is used for storing both Programs and
Data.
Memory Unit Can be Divided into two Parts :
i) Instruction
ii) Data Part
In the Instruction Part we are storing the programs and instructions.
In the Data Part we are storing the operands to perform the operations.
The Memory Unit Consists of Two types of Storage :
 Primary Memory/Primary Storage : It is used to Store the Program while they are executed. When we want to
execute any program that program is stored in Primary Memory.
Example : RAM(Random Access Memory), ROM(Read Only Memory).
 Secondary Memory : Magnetic Disc, Magnetic Tape, CD ROMs
Secondary Memory is Slower when compared to the Primary Memory. In terms of Capacity Secondary
Memory is Large when compared to the Primary Memory.
 Cache Memory : It is a part of the Main Memory. It is Existing between CPU and Main Memory. Frequently
used information and Frequently used data are stored in the cache memory.
In terms of capacity, The Cache Memory capacity is very low. In terms of speed the cache memory speed is
very high.
In terms of Speed Priority given : Cache Memory > Primary Memory > Secondary Memory
In terms of Capacity Priority given : Secondary Memory > Primary Memory > Cache Memory

Von-Neumann Architecture :

Von-Neumann Computer Architecture design was proposed in 1945.It was later known as Von-Neumann architecture.
Historically there have been 2 types of Computers:
Fixed Program Computers – Their function is very specific and they couldn’t be reprogrammed, e.g. Calculators.
Stored Program Computers – These can be programmed to carry out many different tasks, applications are stored on them,
hence the name.
Modern computers are based on a stored-program concept introduced by John Von Neumann. In this stored-program concept,
programs and data are stored in the same memory. This novel idea meant that a computer built with this architecture would be
much easier to reprogram.
It is also known as ISA (Instruction set architecture) computer and is having three basic units:
The Central Processing Unit (CPU)
The Main Memory Unit
The Input/Output Device

1. Central Processing Unit-


The central processing unit is defined as the it is an electric circuit used for the executing the instruction of computer
program.
It has following major components:
1.Control Unit(CU)
2.Arithmetic and Logic Unit(ALU)
3.Variety of Registers
Control Unit –
A control unit (CU) handles all processor control signals. It directs all input and output flow, fetches code for instructions, and
controls how data moves around the system.
Arithmetic and Logic Unit (ALU) –
The arithmetic logic unit is that part of the CPU that handles all the calculations the CPU may need, e.g. Addition, Subtraction,
Comparisons. It performs Logical Operations, Bit Shifting Operations, and Arithmetic operations.
Registers – Registers refer to high-speed storage areas in the CPU. The data processed by the CPU are fetched from
the registers. There are different types of registers used in architecture :-Accumulator: Stores the results of
calculations made by ALU. It holds the intermediate of arithmetic and logical operatoins.it act as a temporary storage
location or device.
Program Counter (PC): Keeps track of the memory location of the next instructions to be dealt with. The PC then
passes this next address to the Memory Address Register (MAR).

Memory Address Register (MAR): It stores the memory locations of instructions that need to be fetched from memory or
stored in memory.
Memory Data Register (MDR): It stores instructions fetched from memory or any data that is to be transferred to, and stored
in, memory.
Current Instruction Register (CIR): It stores the most recently fetched instructions while it is waiting to be coded and
executed.
Instruction Buffer Register (IBR): The instruction that is not to be executed immediately is placed in the instruction buffer
register IBR.

Bus Structures :
Buses – Data is transmitted from one part of a computer to another, connecting all major internal components to the CPU and
memory, by the means of Buses. Types:
I. Data Bus: It carries data among the memory unit, the I/O devices, and the processor.
II. Address Bus: It carries the address of data (not the actual data) between memory and processor.
III. Control Bus: It carries control commands from the CPU (and status signals from other devices) in order to control and
coordinate all the activities within the computer.
Single Bus Structure :
In a single bus structure, one common bus is used to communicate between peripherals and microprocessors. It has
disadvantages due to the use of one common bus.

Advantages of Single Bus Structure :


 Simplicity: The design is simplistic in nature and hence is easy to roll out and even administer.
 Cost-Effective: It is more expensive to have a large number of buses and wiring to power the smart grids, so fewer
buses and less wiring leads to least expensive system.
 Ease of Maintenance: Since there are fewer components that are generally involved, it is easier to diagnose and even
rectify any problems that may exist.

Disadvantages of Single Bus Structure :


 Bandwidth Limitation: Because all the components feed off this bus, the rate at which data is transferred is rather slow
and therefore creates a bottleneck.
 Slower Performance: This is because when many components in the computer request access to the central processing
unit or the RAM at the same time then the system slows down.
 Scalability Issues: More components can intensify the bandwidth problem causing a problem
if expansion of the system becomes necessary.
Double Bus Structure :
In a double bus structure, one bus is used to fetch instructions while other is used to fetch data, required for
execution. It is to overcome the bottleneck of a single bus structure.

Advantages of Double Bus Structure:


 Improved Performance: The efficiency is improved because the system can manage more data at once
since it consists of two buses which are one for memory and the other for I/O.
 Better Bandwidth Utilization: Every bus can work on its own which will help to decrease the traffic and
increase the speed of data exchange.
 Scalability: The system can be expanded more easily, as the two buses can accommodate more
components without significant performance degradation.

Disadvantages of Double Bus Structure :


 Increased Complexity: The design is slightly cumbersome requiring several parts which have to be fitted
properly.
 Higher Cost: The major drawbacks of more buses and wiring are that it brings about an overall increase in
the cost of the system.

 Challenging Maintenance: Identifying problems becomes even more challenging mainly because of the
numerous parts and contact points.

Difference Between Single Bus and Double Bus Structures :

S.
No. Single Bus Structure Double Bus Structure

The same bus is shared by three


1. The two independent buses link various units together.
units (Memory, Processor, and I/O
S.
No. Single Bus Structure Double Bus Structure

units).

One common bus is used for


Two buses are used, one for communication from peripherals and
2. communication between peripherals
the other for the processor.
and processors.

Here, the I/O bus is used to connect I/O units and processor and
The same memory address space is
3. other one, memory bus is used to connect memory and
utilized by I/O units.
processor.

Instructions and data both are


4. Instructions and data both are transferred in different buses.
transferred in same bus.

5. Its performance is low. Its performance is high.

The cost of a single bus structure is


6. The cost of a double bus structure is high.
low.

Number of cycles for execution is


7. Number of cycles for execution is less.
more.

8. Execution of the process is slow. Execution of the process is fast.

Number of registers associated are


9. Number of registers associated are more.
less.

At a time single operand can be


10. At a time two operands can be read.
read from the bus.

Advantages- Advantages-
11.  Less expensive  Better performance
 Simplicity o Improves Efficiency

Basic Operational Concepts :


The primary function of a computer system is to execute a program, sequence of instructions. These instructions are stored in
computer memory.
These instructions are executed to process data which are already loaded in the computer memory through some input devices.
After processing the data, the result is either stored in the memory for further reference, or it is sent to the outside world
through some output port.
To perform the execution of an instruction, in addition to the arithmetic logic unit, and control unit, the processor contains a
number of registers used for temporary storage of data and some special function registers.
The special function registers include program counters (PC), instruction registers (IR), memory address registers (MAR) and
memory and memory data registers (MDR).
The Program counter is one of the most critical registers in CPU.
The Program counter monitors the execution of instructions. It keeps track on which instruction is being executed and what the
next instruction will be.
The instruction register IR is used to hold the instruction that is currently being executed.
The contents of IR are available to the control unit, which generate the timing signals that control, the various processing
elements involved in executing the instruction.
The two registers MAR and MDR are used to handle the data transfer between the main memory and the processor.
The MAR holds the address of the main memory to or from which data is to be transferred.
The MDR contains the data to be written into or read from the addressed word of the main memory.
Whenever the processor is asked to communicate with devices, we say that the processor is servicing the devices. The
processor can service these devices in one of the two ways.
One way is to use the polling routine, and the other way is to use an interrupt.
Polling enables the processor software to check each of the input and output devices frequently. During this check, the
processor tests to see if any devices need servicing or not.
Interrupt method provides an external asynchronous input that informs the processor that it should complete whatever
instruction that is currently being executed and fetch a new routine that will service the requesting device.

Data Representations :
Data is can be anything which represents the specific result or any number, text, image, audio, video etc. For example, If you
will take an example of human being then data for a human being such that name, personal id, country, profession, bank
account details etc. are the important data. Data can be divide into three categories such that data can be personal, public and
private.

. Fixed-Point Representation :
Fixed-point numbers represent a number by fixing the number of digits (or bits) for the integer part and the fractional part.
They are useful for applications requiring consistent precision but with a limited range.

Characteristics:

 Structure: A fixed number of bits are allocated to the integer part and fractional part. For example, a 16-bit number
may allocate 8 bits for the integer part and 8 bits for the fractional part.

Example:

 In binary: 101.11 in fixed-point form represents 5.75 (5 in integer and 0.75 in fractional).

 Range: Limited range since a fixed number of bits are available for the whole number.
 Precision: Limited precision since the fractional part is fixed.
 Operations: Arithmetic operations like addition and subtraction are straightforward but require special handling for
scaling in multiplication and division.

Advantages:

 Simple and fast arithmetic operations.


 Used in systems where consistency and speed are more important than a wide range (e.g., embedded systems, financial
applications).

Disadvantages:

 Limited range compared to floating-point representation.


 Limited precision in representing very small or large numbers.
2. Floating-Point Representation

Floating-point numbers represent a number by dividing it into two parts: a significand (or mantissa) and an exponent. This
allows for a much wider range of values with dynamic precision.

Characteristics:

Structure: A floating-point number consists of three parts: the sign bit, the exponent, and the mantissa.
For example, a number in floating-point form can be represented as:
(-1)s x Mantissa x 2Exponent
where:

 ‘S’ is the sign bit (0 for positive, 1 for negative).


 ‘Mantissa’ represents the significant digits of the number.
 ‘Exponent’ provides the scaling factor, allowing a wide range of values.

Example:

The decimal number 12.75 can be represented as: 1.275×101

Range: Can represent a very wide range of values (small and large numbers).

Precision: Precision can vary, but it is generally higher than fixed-point for large ranges.

Single precision (32 bits): 1 bit for the sign, 8 bits for the exponent, 23 bits for the mantissa.

Double precision (64 bits): 1 bit for the sign, 11 bits for the exponent, 52 bits for the mantissa.

Advantages:

 Can represent very small or very large numbers.


 Dynamic precision allows for efficient storage and computation for a wide range of values.

Disadvantages:

 Slower arithmetic operations compared to fixed-point, as more complex circuitry is needed for handling dynamic
precision and normalization.
 Can suffer from rounding errors and loss of precision in some cases.

Key Differences:

Feature Fixed-Point Floating-Point


Range Limited Very wide
Precision Fixed Varies (higher for large ranges)
Complexity of Operations Simple Complex
Use Cases Embedded systems, finance Scientific computations,
graphics

Error Detecting Codes :


When the binary data is transmitted and processed, it is susceptible to noise that can alter its contents from ‘1’ to ‘0’ and ‘0’
to ‘1’. It imposes a serious problem.
Several schemes have been used to detect the occurrence of a single bit error in a binary word, whenever such an error
occurs, the concerned binary word can be corrected and transmitted.

Errors may be, 1 --------> 0 OR


0 --------> 1

Features of Error Detecting Codes :


 Error detecting codes are adopted when backward error correction techniques are used for reliable data
transmission. In this method, the receiver sends a feedback message to the sender to inform whether an error-free
message has been received or not. If there are errors, then the sender retransmits the message.
 Error-detecting codes are usually block codes, where the message is divided into fixed-sized blocks of bits, to which
redundant bits are added for error detection.
 Error detection involves checking whether any error has occurred or not. The number of error bits and the type of
error does not matter.

Error Detection Techniques:

There are three main techniques for detecting errors :

Parity Bits
The simplest technique for detecting errors is that of adding an extra bit known as the “Parity Bit to each word to be
transmitted.
There are two types of parity :
(i) Odd Parity
(ii) Even Parity
 For the data to be transmitted, if the number of 1’s in the data including the parity bit corresponds to an odd
number of 1’s, then the parity bit is referred as odd parity.
For Example : Suppose the data that is to be transmitted is ‘101101’. Suppose this data that is to be transmitted
with ‘Odd Parity’, that means, the number of 1’s in the given binary word is odd.

So here, in ‘101101’, four 1’s are there, but we have to send this binary data with odd parity, but the number of 1’s
in the binary word is four. Now we have to add an extra bit called ‘Parity Bit’. Here the extra parity bit is ‘1’. Hence,

This ‘Message Bit’ and the ‘Parity Bit’ both are send to the receiver.

Here are five 1’s are there including the parity bit. So, this type of parity is called as ‘Odd Parity’ because there are
five number of 1’s which is odd.

 If the data to be transmitted, including the parity bit corresponds to an even number of 1’s, then the parity bit is
referred to as even parity.
For Example : Suppose we have to send another message ‘110111’, so this message send with Even Parity. This
message contains five number of 1’s where 5 is an odd number but we have to send the message from sender to
the receiver with even parity. Now we can add an extra bit. Hence,

This extra bit is called parity bit. Including the parity bit there are six 1’s. Now this message is sent with an ‘Even
Parity’.

Please Go through the table :

Decimal Number 8421 Code Odd Parity Even Parity


1 0001 0 1
2 0010 0 1
3 0011 1 0
4 0100 0 1
5 0101 1 0
6 0110 1 0
7 0111 0 1
8 1000 0 1

Check-Sum
Simple Parity cannot detect two errors within the same binary word.
In Check-Sum, each word is added to the previous word, we get the total sum and the complement is the check-sum, It is
transmitted along with the data. When the receiver gets this data, a new checksum is calculated and compared with the existing
checksum.
Both checksum are matched, it indicates no error, otherwise, there is an error occurred in the data.
For error detection in Checksum data is divided into fixed sized frames or segment.
Limitations: Can detect many errors, but not all. For example, two errors that cancel each other out might go undetected.
Cyclic Redundancy Check (CRC)

 Definition: A more sophisticated checksum method that uses polynomial division to detect changes to raw data. It is
very effective at catching errors in data.
 Limitations: While very reliable, it requires more computation than simpler methods like parity.

Hamming Code

 Definition: Uses multiple parity bits to detect and correct single-bit errors and detect two-bit errors.
 How It Works: Adds redundancy bits at specific positions in the data to create a code word. The receiver can use the
pattern of these bits to detect and correct errors.
 Limitations: The added redundancy increases the amount of data transmitted or stored.

IMPORTANT QUESTIONS :

A .Multiple Choice Questions :

1. Which of the following is NOT a functional unit of a computer system?


a) Input Unit
b) Output Unit
c) Control Unit
d) Printer Unit

Answer: d) Printer Unit

2. The Arithmetic Logic Unit (ALU) is responsible for:


a) Performing calculations and logical operations
b) Controlling the flow of data between the CPU and memory
c) Storing instructions and data
d) Managing the input and output operations

Answer: a) Performing calculations and logical operations

3. Which of the following is responsible for coordinating all activities of the computer?
a) ALU
b) Control Unit
c) Input Unit
d) Output Unit

Answer: b) Control Unit

4. In a computer system, the memory unit is responsible for:


a) Storing data and instructions
b) Performing arithmetic operations
c) Controlling the execution of instructions
d) Managing input and output operations

Answer: a) Storing data and instructions

5. The main characteristic of the Von Neumann architecture is:


a) Separate memory for data and instructions
b) Single memory for both data and instructions
c) No memory at all
d) Parallel execution of instructions

Answer: b) Single memory for both data and instructions

6. In Von Neumann architecture, both data and instructions are stored in:
a) Cache memory
b) Main memory
c) Secondary storage
d) ALU

Answer: b) Main memory

7. In Von Neumann architecture, instructions are executed in which order?


a) Random order
b) Sequential order
c) Backward order
d) Parallel order

Answer: b) Sequential order

8. A bus in computer organization refers to:


a) A hardware device for input/output
b) A communication pathway for data transfer between components
c) A software interface
d) A storage unit

Answer: b) A communication pathway for data transfer between components

9. Which of the following is NOT a type of bus in a computer system?


a) Data bus
b) Control bus
c) Address bus
d) Memory bus

Answer: d) Memory bus


10. What is the function of the Address Bus?
a) Transfer data between the CPU and memory
b) Carry control signals
c) Transfer memory addresses from the CPU to other devices
d) Provide power to devices

Answer: c) Transfer memory addresses from the CPU to other devices

11. In a bus structure, which bus is responsible for carrying signals that control the operation of other components? a)
Address bus
b) Control bus
c) Data bus
d) Memory bus

Answer: b) Control bus

12. The process of fetching an instruction from memory and executing it is called:
a) Instruction cycle
b) Machine cycle
c) Fetch-execute cycle
d) Memory cycle

Answer: c) Fetch-execute cycle

13. The basic operational concept of a computer involves:


a) Only processing data
b) Fetching and executing instructions sequentially
c) Fetching multiple instructions at once
d) Only performing arithmetic operations

Answer: b) Fetching and executing instructions sequentially

14. In fixed-point representation, the position of the decimal point is:


a) Fixed
b) Floating
c) Variable
d) Both fixed and variable

Answer: a) Fixed

15. Floating-point numbers are typically represented using:


a) Base 10
b) Exponent and mantissa
c) Only integers
d) Whole numbers

Answer: b) Exponent and mantissa

16. Which of the following is a disadvantage of fixed-point representation?


a) Lower precision
b) More complex arithmetic operations
c) Requires more memory
d) Allows for a larger range of values

Answer: a) Lower precision


17. Which part of a floating-point number indicates the precision?
a) Exponent
b) Mantissa
c) Sign bit
d) Base

Answer: b) Mantissa

18. Which of the following is an error-detecting code?


a) Parity bit
b) Floating-point code
c) ASCII
d) Control bit

Answer: a) Parity bit

19. A Hamming Code is used for:


a) Memory management
b) Arithmetic operations
c) Error detection and correction
d) Data transmission

Answer: c) Error detection and correction

20. In an even parity error detection system, if the data is 101100, the parity bit will be:
a) 0
b) 1
c) 2
d) 3

Answer: b) 1

B. Answer the following questions :

Q1) Explain the Functional Units of a Digital Computer with the Help of a Diagram.
Q2) Explain Von Neumann Architecture with the help of a Diagram.
Q3) Define :
(i) Fixed Program Computers
(ii) Stored Program Computers
(iii) ALU
(iv) Accumulator
(v) Registers, Types of Registers.
Q4) What is a “Bus” ? Define the different types of bus. Explain the different types of Bus Structures with Diagram.
Q5) What is the difference between “Single Bus” and “Double Bus” Structure ?
Q6) Explain the Basic Operational Concept of a Computer.
Q7) Explain “Fixed Point” and “Floating Point” data representation with example.
Q8) What do you mean by “Error Detecting Codes” ? Write the Features of Error Detecting Codes.
Q9) Explain :
(i) Parity Bit
(ii) Checksum Method
(iii) CRC
(iv) Hamming Code

You might also like