COA Unit-1 Notes (P1)
COA Unit-1 Notes (P1)
COA Unit-1 Notes (P1)
ASANSOL
Pre Test:
UNIT-1 (Part-1)
Structure Of Computer
Computer Functional Units :
• 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
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.
Challenging Maintenance: Identifying problems becomes even more challenging mainly because of the
numerous parts and contact points.
S.
No. Single Bus Structure Double Bus Structure
units).
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.
Advantages- Advantages-
11. Less expensive Better performance
Simplicity o Improves Efficiency
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:
Disadvantages:
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:
Example:
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:
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:
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’.
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 :
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
6. In Von Neumann architecture, both data and instructions are stored in:
a) Cache memory
b) Main memory
c) Secondary storage
d) ALU
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
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: a) Fixed
Answer: b) Mantissa
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
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