COMPUTER ORGANIZATION
UNIT-1
TOPICS
• BASIC FUNCTIONAL UNITS OF COMPUTER
• Functional Units, Basic Operational concepts, Bus
Structure, Software, Performance, Multi Processor and
Multi Computer.
• DATA REPRESENTATION
• Signed Number Representation, Fixed and Floating Point
Representations.
• COMPUTER ARITHMETIC
• Addition and Subtraction, Multiplication Algorithms,
Division Algorithms, Error Detection and Error Correction
Codes.
BASIC FUNCTIONAL UNITS OF COMPUTER
FUNCTIONAL UNITS
• The Input Unit
• Arithmetic Logic Unit (ALU)
• Output Unit
• Memory Unit
• Control Unit
BASIC OPERATIONAL CONCEPTS
• Instructions take a vital role for the proper working of the
computer.
• An appropriate program consisting of a list of instructions is stored
in the memory so that the tasks can be started.
• The memory brings the Individual instructions into the processor,
which executes the specified operations.
• Data which is to be used as operands are moreover also stored in
the memory.
• Example:
• Add LOCA, R0
• This instruction adds the operand at memory location LOCA to
the operand which will be present in the Register R0.
• Load LOCA, R1
• Add R1, R0
• First instruction sends the contents of the memory location
LOCA into processor Register R0, and meanwhile the second
instruction adds the contents of Register R1 and R0 and places
the output in the Register R1.
• Analysing how processor and memory are connected
• Processors have various registers to perform various functions :-
• Program Counter :- It contains the memory address of next
instruction to be fetched.
• Instruction Register:- It holds the instruction which is currently
being executed.
• MDR :- It facilities communication with memory. It contains the
data to be written into or read out of the addressed location.
• MAR :- It holds the address of the location that is to be accessed
• There are n general purpose registers that is R0 to Rn-1
BUS STRUCTURE
• Bus structures in computer plays important role in connecting
the internal components of the computer. The bus in the
computer is the shared transmission medium. This means
multiple components or devices use the same bus structure
to transmit the information signals to each other.
• Single Bus Structure
• Multi Bus Structure
• Data Lines Synchronous Bus
• Address Lines
• Control Lines Asynchronous Bus
SOFTWARE
• Software is the set of programs (instructions) that tell a
computer what to do”
• There are two types of software :
• System software
• Application software
• System software is a type of computer program that is
designed to run a computer's hardware and application
programs. System software is of three main types :
• Operating system
• Language processor
• Utility software
• An application is any program, or group of programs, that
is designed for the end user. Applications software (also
called end-user programs) include such things as database
programs, word processors, Web browsers and spreadsheets.
PERFORMANCE
•
To improve performance you can either:
• Decrease the CPI (clock cycles per instruction) by using new
Hardware.
• Decrease the clock time or Increase clock rate by reducing
propagation delays or by use pipelining.
• Decrease the number of required cycles or improve ISA or
Compiler.
BASIC PERFORMANCE EQUATION
• Clock speed : The clock speed - also known as clock rate -
indicates how fast the CPU can run. This is measured
in megahertz (MHz) or gigahertz (gHz) and corresponds
with how many instruction cycles the CPU can deal with in a
second.
• Instruction Set : RISC and CISC
• Pipeline
MULTIPROCESSORS AND MULTICOMPUTER
• Multiprocessors and multicomputers are types of
architectures used in the computer.
• Multiprocessor is one where multiple processors are used that
share the same memory for operating and are connected to
function together.
• Multicomputer: multiple computers that have different
processor are connected and each has their own different
memory.
DATA REPRESENTATION
SIGNED NUMBER REPRESENTATION
• A signed integer is an integer with a positive ‘+’ or negative
sign ‘-‘ associated with it. Since the computer only
understands binary, it is necessary to represent these signed
integers in binary form.]
• Signed Integer can be represented in three ways:
• Signed bit.
• 1’s Complement.
• 2’s Complement.
SIGNED BIT REPRESENTATION
• In the signed integer representation method the following
rules are followed:
• 1. The MSB (Most Significant Bit) represents the sign of the
Integer.
2. Magnitude is represented by other bits other than MSB i.e.
(n-1) bits where n is the no. of bits.
3. If the number is positive, MSB is 0 else 1.
4. The range of signed integer representation of an n-bit
number is given as –(2^{n-1}-1) to (2)^{n-1}-1
1’S COMPLEMENT REPRESENTATION OF A SIGNED INTEGER
• In 1’s complement representation the following rules are used:
• 1. For +ve numbers the representation rules are the same as signed
integer representation.
2. For –ve numbers, Write the +ve number in binary and take 1’s
complement of it.
2’S COMPLEMENT REPRESENTATION
• In 2’s Complement representation the following rules are used:
• 1. For +ve numbers, the representation rules are the same as
signed integer representation.
2. For –ve numbers, there are two different ways we can
represent the number. Write an unsigned representation of 2^n-
X for –X in n-bit representation.
• Write a representation of +X and take 2’s Complement.
FIXED AND FLOATING POINT
REPRESENTATIONS
• Digital Computers use Binary number system to represent all
types of information inside the computers. Alphanumeric
characters are represented using binary bits (i.e., 0 and 1).
Digital representations are easier to design, storage is easy,
accuracy and precision are greater.
FIXED POINT REPRESENTATION
• This representation has fixed number of bits for integer part and for
fractional part.
• For example, if given fixed-point representation is IIII.FFFF, then you
can store minimum value is 0000.0001 and maximum value is
9999.9999.
• There are three parts of a fixed-point number representation: the sign
field, integer field, and fractional field.
FLOATING-POINT REPRESENTATION
• This representation does not reserve a specific number of bits
for the integer part or the fractional part. Instead it reserves
a certain number of bits for the number (called the mantissa
or significand) and a certain number of bits to say where
within that number the decimal place sits (called the
exponent).
COMPUTER ARITHMETIC
ADDITION AND SUBTRACTION
operations Addition of Magnitudes SUBTRACTION of Magnitudes
A>B A<B A=B
(+A) + + (A+B)
(+B) + (-
(+A) (A-B)
+ (A-B) - (B-A) +
B) + (B-A)
(-A) + (+B) - (A-B) + (A-B)
(-A) + (-B) - (A+B)
(+A) - (+B) + (A-B) - (B-A) + (A-B)
(+A) - (-B) + (A+B)
(-A) - (+B) - (A+B)
(-A) - (-B) + (A-B) - (B-A) (A-B)
+
MULTIPLICATION
BOOTH MULTIPLICATION ALGORITHM
DIVISION ALGORITHMS
ERROR DETECTION AND CORRECTION
CODES
• during transmission of binary data from one system to the
other, the noise may also be added. Due to this, there may
be errors in the received data at other system.
• That means a bit 0 may change to 1 or a bit 1 may change to
0. We can’t avoid the interference of noise. But, we can get
errors𝑠 present and then correcting those errors
back the original data first by detecting whether any
• Error detection codes
• Error correction codes
• Error detection codes − are used to detect the errors𝑠 present in the
received data bitstream𝑏𝑖𝑡𝑠𝑡𝑟𝑒𝑎𝑚. These codes contain some bits𝑠, which
are included appended𝑎𝑝𝑝𝑒𝑛𝑑𝑒𝑑 to the original bit stream. These codes
data bitstream𝑏𝑖𝑡𝑠𝑡𝑟𝑒𝑎𝑚.Example − Parity code, Hamming code.
detect the error, if it is occurred during transmission of the original
• Error correction codes − are used to correct the errors𝑠 present in the
received data bitstream𝑏𝑖𝑡𝑠𝑡𝑟𝑒𝑎𝑚 so that, we will get the original data.
Error correction codes also use the similar strategy of error detection
codes.Example − Hamming code.
• Therefore, to detect and correct the errors, additional bits𝑠 are appended to
the data bits at the time of transmission.
HAMMING CODE
• Hamming code is useful for both detection and correction of error present in the
received data. This code uses multiple parity bits and we have to place these parity
bits in the positions of powers of 2.
• The minimum value of 'k' for which the following relation is correct valid𝑣𝑎𝑙𝑖𝑑 is
nothing but the required number of parity bits.
• 2k≥n+k+1
• Where,
• ‘n’ is the number of bits in the binary code information𝑖𝑛𝑓𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛
• ‘k’ is the number of parity bits
• Therefore, the number of bits in the Hamming code is equal to n + k.
ERROR DETECTION AND CORRECTION
• Decoding a message in Hamming Code
• Once the receiver gets an incoming message, it performs recalculations to detect errors
and correct them. The steps for recalculation are −
• Step 1 − Calculation of the number of redundant bits.
• Step 2 − Positioning the redundant bits.
• Step 3 − Parity checking.
• Step 4 − Error detection and correction
• Step 1 − Calculation of the number of redundant bits
• Using the same formula as in encoding, the number of redundant bits are ascertained.
• 2r ≥ m + r + 1 where m is the number of data bits and r is the number of redundant bits.
• Step 2 − Positioning the redundant bits
• The r redundant bits placed at bit positions of powers of 2, i.e. 1, 2, 4, 8, 16 etc.
ERROR DETECTION AND CORRECTION
• Step 3 − Parity checking
• Parity bits are calculated based upon the data bits and the redundant bits using
the same rule as during generation of c1,c2 ,c3 ,c4 etc. Thus
• c1 = parity(1, 3, 5, 7, 9, 11 and so on)
• c2 = parity(2, 3, 6, 7, 10, 11 and so on)
• c3 = parity(4-7, 12-15, 20-23 and so on)
• Step 4 − Error detection and correction
• The decimal equivalent of the parity bits binary values is calculated. If it is 0, there
is no error. Otherwise, the decimal value gives the bit position which has error. For
example, if c1c2c3c4 = 1001, it implies that the data bit at position 9, decimal
equivalent of 1001, has error. The bit is flipped to get the correct message
• Common applications of using Hemming code are Satellites
Computer Memory, Modems, Embedded Processor, etc.
• The biggest benefit of the hamming code method is effective on
networks where the data streams are given for the single-bit errors.
• The biggest drawback of the hamming code method is that it can
solve only single bits issues.
• We can perform the process of encrypting and decoding the
message with the help of hamming code.
ERROR DETECTION AND CORRECTION EXAMPLE
ERROR DETECTION AND CORRECTION
EXAMPLE