COMPUTER ORGANIZATION Unit 1
COMPUTER ORGANIZATION Unit 1
UNIT-1
All types of computers follow the same basic logical structure and perform the following five basic
operations for converting raw input data into information useful to their users.
1 Take Input The process of entering data and instructions into the computer system.
Saving data and instructions so that they are available for processing as
2 Store Data
and when required.
Output The process of producing useful information or results for the user, such
4
Information as a printed report or visual display.
Control the Directs the manner and sequence in which all of the above operations
5
workflow are performed.
Input Unit
This unit contains devices with the help of which we enter data into the computer. This unit creates a link
between the user and the computer. The input devices translate the information into a form understandable
by the computer.
AD
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
ALU (Arithmetic Logic Unit)
Memory Unit
Control Unit
Output Unit
The output unit consists of devices with the help of which we get the information from the computer. This
unit is a link between the computer and the users. Output devices translate the computer's output into a form
understandable by the users.
S.
Computer Architecture Computer Organization
No.
1. Architecture describes what the computer does. The Organization describes how it does it.
Computer Architecture deals with the functional Computer Organization deals with a structural
2.
behavior of computer systems. relationship.
In the above figure, it’s clear that it deals with high- In the above figure, it’s also clear that it deals
3.
level design issues. with low-level design issues.
As a programmer, you can view architecture as a series The implementation of the architecture is called
5.
of instructions, addressing modes, and registers. organization.
Computer Architecture is also called Instruction Set Computer Organization is frequently called
7.
Architecture (ISA). microarchitecture.
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
The different architectural categories found in our
computer systems are as follows: CPU organization is classified into three categories
based on the number of address fields:
Von-Neumann Architecture
Harvard Architecture
9. Organization of a single Accumulator.
Instruction Set Architecture
Organization of general registers
Micro-architecture
Stack organization
System Design
It makes the computer’s hardware visible. It offers details on how well the computer performs.
10.
Architecture coordinates the hardware and software Computer Organization handles the segments of the
11. of the system. network in a system.
The software developer is aware of it. It escapes the software programmer’s detection.
12.
Examples- Intel and AMD created the x86 Organizational qualities include hardware elements that
processor. Sun Microsystems and others created are invisible to the programmer, such as interfacing of
13. the SPARC processor. Apple, IBM, and Motorola computer and peripherals, memory technologies, and
created the PowerPC. control signals.
Number Systems
The language we use to communicate with each other is comprised of words and characters. We understand
numbers, characters and words. But this type of data is not suitable for computers. Computers only
understand the numbers.
So, when we enter data, the data is converted into electronic pulse. Each pulse is identified as code and the
code is converted into numeric format by ASCII. It gives each number, character and symbol a numeric
value (number) that a computer understands. So to understand the language of computers, one must be
familiar with the number systems.
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
o Hexadecimal number system
As, we have four types of number systems so each one can be converted into the remaining three systems.
There are the following conversions possible in Number System
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
Binary to other Number Systems
There are three conversions possible for binary number, i.e., binary to decimal, binary to octal, and binary to
hexadecimal. The conversion process of a binary number to decimal differs from the remaining others. Let's
take a detailed discussion on Binary Number System conversion.
Let's take an example to understand how the conversion is done from binary to decimal.
Example 1: (10110.001)2
We multiplied each bit of (10110.001) 2 with its respective positional weight, and last we add the products of
all the bits with its weight.
(10110.001)2=(1×24)+(0×23)+(1×22)+(1×21)+(0×20)+
(0×2-1)+(0×2-2)+(1×2-3)
(10110.001)2=(1×16)+(0×8)+(1×4)+(1×2)+(0×1)+
(0×1⁄2)+(0×1⁄4)+(1×1⁄8)
(10110.001)2=16+0+4+2+0+0+0+0.125
(10110.001)2=(22.125 )10
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
1. In the first step, we have to make the pairs of three bits on both sides of the binary point. If there will be one
or two bits left in a pair of three bits pair, we add the required number of zeros on extreme sides.
2. In the second step, we write the octal digits corresponding to each pair.
Example 1: (111110101011.0011)2
1. Firstly, we make pairs of three bits on both sides of the binary point.
On the right side of the binary point, the last pair has only one bit. To make it a complete pair of three bits,
we added two zeros on the extreme side.
(111110101011.0011)2=(7653.14)8
1. In the first step, we have to make the pairs of four bits on both sides of the binary point. If there will be one,
two, or three bits left in a pair of four bits pair, we add the required number of zeros on extreme sides.
2. In the second step, we write the hexadecimal digits corresponding to each pair.
Example 1: (10110101011.0011)2
1. Firstly, we make pairs of four bits on both sides of the binary point.
On the left side of the binary point, the first pair has three bits. To make it a complete pair of four bits, add
one zero on the extreme side.
(011110101011.0011)2=(7AB.3)16
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
form(individually). There are the following steps that are used to convert the decimal number into a similar
number of any base 'r'.
1. In the first step, we perform the division operation on integer and successive part with base 'r'. We will list
down all the remainders till the quotient is zero. Then we find out the remainders in reverse order for getting
the integer part of the equivalent number of base 'r'. In this, the least and most significant digits are denoted
by the first and the last remainders.
2. In the next step, the multiplication operation is done with base 'r' of the fractional and successive fraction.
The carries are noted until the result is zero or when the required number of the equivalent digit is obtained.
For getting the fractional part of the equivalent number of base 'r', the normal sequence of carrying is
considered.
1. In the first step, we perform the division operation on the integer and the successive quotient with the base of
binary(2).
2. Next, we perform the multiplication on the integer and the successive quotient with the base of binary(2).
Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 2.
152/2 76 0 (LSB)
76/2 38 0
38/2 19 0
19/2 9 1
9/2 4 1
4/2 2 0
2/2 1 0
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
1/2 0 1(MSB)
(152)10=(10011000)2
Step 2:
Now, perform the multiplication of 0.27 and successive fraction with base 2.
0.25×2 0.50 0
0.50×2 0 1
(0.25)10=(.01)2
1. In the first step, we perform the division operation on the integer and the successive quotient with the base of
octal(8).
2. Next, we perform the multiplication on the integer and the successive quotient with the base of octal(8).
Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 8.
152/8 19 0
19/8 2 3
2/8 0 2
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
(152)10=(230)8
Step 2:
Now perform the multiplication of 0.25 and successive fraction with base 8.
0.25×8 0 2
(0.25)10=(2)8
1. In the first step, we perform the division operation on the integer and the successive quotient with the base of
hexadecimal (16).
2. Next, we perform the multiplication on the integer and the successive quotient with the base of hexadecimal
(16).
Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 8.
152/16 9 8
9/16 0 9
(152)10=(98)16
Step 2:
Now perform the multiplication of 0.25 and successive fraction with base 16.
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
Operation Result carry
0.25×16 0 4
(0.25)10=(4)16
Let's take an example to understand how the conversion is done from octal to decimal.
Example 1: (152.25)8
Step 1:
We multiply each digit of 152.25 with its respective positional weight, and last we add the products of all
the bits with its weight.
(152.25)8=(1×82)+(5×81)+(2×80)+(2×8-1)+(5×8-2)
(152.25)8=64+40+2+(2×1⁄8)+(5×1⁄64)
(152.25)8=64+40+2+0.25+0.078125
(152.25)8=106.328125
Example 1: (152.25)8
(152.25)8=(001101010.010101)2
1. In the first step, we will find the binary equivalent of number 25.
2. Next, we have to make the pairs of four bits on both sides of the binary point. If there will be one, two, or
three bits left in a pair of four bits pair, we add the required number of zeros on extreme sides and write the
hexadecimal digits corresponding to each pair.
Example 1: (152.25)8
Step 1:
(152.25)8=(001101010.010101)2
Step 2:
1. Now, we make pairs of four bits on both sides of the binary point.
0 0110 1010.0101 01
On the left side of the binary point, the first pair has only one digit, and on the right side, the last pair has
only two-digit. To make them complete pairs of four bits, add zeros on extreme sides.
Let's take an example to understand how the conversion is done from hexadecimal to decimal.
Example 1: (152A.25)16
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
Step 1:
We multiply each digit of 152A.25 with its respective positional weight, and last we add the products of all
the bits with its weight.
(152A.25)16=(1×163)+(5×162)+(2×161)+(A×160)+(2×16-1)+(5×16-2)
(152A.25)16=(1×4096)+(5×256)+(2×16)+(10×1)+(2×16-1)+(5×16-2)
(152A.25)16=4096+1280+32+10+(2×1⁄16)+(5×1⁄256)
(152A.25)16=5418+0.125+0.125
(152A.25)16=5418.14453125
Example 1: (152A.25)16
For converting hexadecimal to octal, there are two steps required to perform, which are as follows:
1. In the first step, we will find the binary equivalent of the hexadecimal number.
2. Next, we have to make the pairs of three bits on both sides of the binary point. If there will be one or two bits
left in a pair of three bits pair, we add the required number of zeros on extreme sides and write the octal digits
corresponding to each pair.
Example 1: (152A.25)16
Step 1:
Step 2:
3. Then, we make pairs of three bits on both sides of the binary point.
(001010100101010.001001010)2=(12452.112)8
1's complement
In number representation techniques, the binary number system is the most used representation technique in
digital electronics. The complement is used for representing the negative decimal number in binary form.
Different types of complement are possible of the binary number, but 1's and 2's complements are mostly
used for binary numbers. We can find the 1's complement of the binary number by simply inverting the
given number. For example, 1's complement of binary number 1011001 is 0100110. We can find the 2's
complement of the binary number by changing each bit(0 to 1 and 1 to 0) and adding 1 to the least
significant bit. For example, 2's complement of binary number 1011001 is (0100110)+1=0100111.
For finding 1's complement of the binary number, we can implement the logic circuit also by using NOT
gate. We use NOT gate for each bit of the binary number. So, if we want to implement the logic circuit for
5-bit 1's complement, five NOT gates will be used.
Example 1: 11010.1101
For finding 1's complement of the given number, change all 0's to 1 and all 1's to 0. So the 1's complement
of the number 11010.1101 comes out 00101.0010.
Example 2: 100110.1001
For finding 1's complement of the given number, change all 0's to 1 and all 1's to 0. So, the 1's complement
of the number 100110.1001 comes out 011001.0110.
0000 1111
0001 1110
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
0010 1101
0011 1100
0100 1011
0101 1010
0110 1001
0111 1000
1000 0111
1001 0110
1010 0101
1011 0100
1100 0011
1101 0010
1110 0001
1111 0000
In signed binary number representation, we can represent both positive and negative numbers. For
representing the positive numbers, there is nothing to do. But for representing negative numbers, we have to
use 1's complement technique. For representing the negative number, we first have to represent it with a
positive sign, and then we find the 1's complement of it.
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
Let's take an example of a positive and negative number and see how these numbers are represented.
Example 1: +6 and -6
The number +6 is represented as same as the binary number. For representing both numbers, we will take
the 5-bit register.
1. +6=0 0110
2. Find the 1's complement of the number 0 0110, i.e., 1 1001. Here, MSB denotes that a number is a negative
number.
Here, MSB refers to Most Significant Bit, and LSB denotes the Least Significant Bit.
The number +120 is represented as same as the binary number. For representing both numbers, take the 8-bit
register.
1. +120=0 1111000
2. Now, find the 1's complement of the number 0 1111000, i.e., 1 0000111. Here, the MSB denotes the number
is the negative number.
2's complement
Just like 1's complement, 2's complement is also used to represent the signed binary numbers. For finding 2's
complement of the binary number, we will first find the 1's complement of the binary number and then add 1
to the least significant bit of it.
For example, if we want to calculate the 2's complement of the number 1011001, then firstly, we find the 1's
complement of the number that is 0100110 and add 1 to the LSB. So, by adding 1 to the LSB, the number
will be (0100110)+1=0100111. We can also create the logic circuit using OR, AND, and NOT gates. The
logic circuit for finding 2's complement of the 5-bit binary number is as follows:
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
Example 1: 110100
For finding 2's complement of the given number, change all 0's to 1 and all 1's to 0. So the 1's complement
of the number 110100 is 001011. Now add 1 to the LSB of this number, i.e., (001011)+1=001100.
Example 2: 100110
For finding 1's complement of the given number, change all 0's to 1 and all 1's to 0. So, the 1's complement
of the number 100110 is 011001. Now add one the LSB of this number, i.e., (011001)+1=011010.
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
1010 0101 0110
Example 1: +6 and -6
The number +6 is represented as same as the binary number. For representing both numbers, take the 5-bit
register.
1. +6=0 0110
2. Now, find the 1's complement of the number 0 0110, i.e. 1 1001.
3. Now, add 1 to its LSB. When we add 1 to the LSB of 11001, the newly generated number comes out 11010.
Here, the sign bit is one which means the number is the negative number.
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
Example 2: +120 and -120
The number +120 is represented as same as the binary number. For representing both numbers, take the 8-bit
register.
1. +120=0 1111000
2. Now, find the 1's complement of the number 0 1111000, i.e. 1 0000111. Here, the MSB denotes the number is
the negative number.
3. Now, add 1 to its LSB. When we add 1 to the LSB of 1 0000111, the newly generated number comes out 1
0001000. Here, the sign bit is one, which means the number is the negative number.
4. Binary arithmetic is essential part of all the digital computers and many other digital system.
Binary Addition
It is a key for binary subtraction, multiplication, division. There are four rules of binary addition.
In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the given column
and a carry of 1 over to the next column.
Example − Addition
Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for the binary subtraction. There are
four rules of binary subtraction.
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584
Example − Subtraction
Binary Multiplication
Binary multiplication is similar to decimal multiplication. It is simpler than decimal multiplication because
only 0s and 1s are involved. There are four rules of binary multiplication.
Example − Multiplication
5.
Binary Division
Binary division is like decimal division. It is called as the long division procedure.
Example − Division
ASCENT CLASSES, Lalaji Balaji Market, Behind Laxmi Tower, Hanumangarh Junction
Director: Er. R.D. Garg, Contact: 89468-58584