0% found this document useful (0 votes)
18 views17 pages

Computer Achitecture

The document provides an overview of various number systems including decimal, binary, octal, and hexadecimal, detailing their conversions and mathematical representations. It also explains combinational circuits such as half adders and full adders, along with their logical operations and truth tables. Additionally, it introduces computer architecture concepts, specifically Von Neumann and Harvard architectures, and discusses basic logic gates and their functions.

Uploaded by

ejarjun777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views17 pages

Computer Achitecture

The document provides an overview of various number systems including decimal, binary, octal, and hexadecimal, detailing their conversions and mathematical representations. It also explains combinational circuits such as half adders and full adders, along with their logical operations and truth tables. Additionally, it introduces computer architecture concepts, specifically Von Neumann and Harvard architectures, and discusses basic logic gates and their functions.

Uploaded by

ejarjun777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

File Downloaded From www.Bustudymate.

in
NUMBER SYSTEMS
There are several number systems which we normally use, such as decimal, binary, octal, hexadecimal, etc.
The Decimal Number System: The Decimal number system is a number system of base or radix equal to 10,
called Arabic numerals. The symbols used to represent number : 0, 1, 2, 3,4,5,6,7,8, 9 which are used for
counting.
This is expressed mathematically of the first five positions as 10 4 103 102 101 100

For example the value of the combination of symbols 435 is determined by adding the weight of each position
as 4 * 102 + 3 * 101 + 5 * 10owhich can be written as
4 * 100 + 3 * 10 + 5 * 1 or 400 + 30 + 5 = 435

What is positional and non-positional number system?


Different Types of Conversions
 Decimal System
Binary to Decimal Decimal to Binary

 Octal System
Octal to decimal Decimal to Octal
Octal to Binary Binary to Octal

 Hexa-Decimal System
Hexa-Decimal to Decimal
Decimal to Hexa-Decimal
Hexa-Decimal toBinary
Binary to Hexa-Decimal

………………………………………………………………………………………………………………….
Binary to Decimal

Binary weights for whole numbers


Position 10 9 8 7 6 5 4 3 2 1 0

Weight 210 29 28 27 26 25 24 23 22 21 20

Value 1024 512 256 128 64 32 16 8 4 2 1

Binary weights for Fractional numbers


Position -1 -2 -3 -4 -5 -6

Weight 2-1 2-2 2-3 2-4 2-5 2-6

Value 0.5 0.25 0.125 0.0625 0.03125 0.015625

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in
Example Problems
1. Convert binary number 1110012 to decimal. Solve the following (Binary to Decimal)
1110012 = 1×2 +1×2 +1×2 +0×2 +0×2 +1×2 = (57)10
5 4 3 2 1 0

1. 11011012= 10910
2. Convert binary number 1110.0112 to decimal. 2. 0.0112= 0.37510
1110.0012 3. 1111.10112= 15.687510
= 1×23+1×22+1×21+0×20+0×2-1 +1×2-2 +1×2-3 = (15.375)10

Decimal to Binary
Example Problems

Solve the following (Decimal to Binary)

1. 4110= 1010012
2. 0.610= 0.100112
3. 4096.312510 =
1000000000000.01012

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in
+

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in
Octal to Decimal
Example Problems

Solve the following (Octal to Decimal)

1. 630.48= 408.510
2. 54738= 287510
3. 763.3758= 499.4939510

Convert Decimal to Octal


Example Problems
Convert the following decimal numbers into Octal Equivalent
a) 245 b) 175

Octal to Binary

Binary to Octal

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in
Binary Addition

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

COMBINATIONAL CIRCUITS

1. What is a combinational circuit?


 The output of combinational circuit at any instant of time depends only on the levels present at input
terminals.
 The combinational circuit does not use any memory. The previous state of input does not have any
effect on the present state of the circuit.
 A combinational circuit can have an n number of inputs and m number of outputs.

…..………………………………………………………………………………………………………………….
HALF ADDER
A half adder takes two single bit binary numbers and produces a sum and a carry–out, called “carry”.

Logic Symbol Truth Table


A B S C
in in out out
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

Logical Expression
Logic Diagram
The sum can be given in two equivalent expressions.
The simplest expression uses the exclusive OR
function
Sum = AB

Carry is the logical AND of the two inputs:


Carry = A·B

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

Half adder is a combinational logic circuit with two inputs and two outputs. The half adder circuit is designed to
add two single bit binary numbers A and B. It is the basic building block for addition of two single bit numbers.
This circuit has two outputs carry and sum.

FULL ADDER
Full adder is developed to overcome the drawback of Half Adder circuit. The full adder is a three input and two
output combinational circuit. The first two inputs are A and B and the third input is an input carry as C-in and
produces a sum ‘S’ and a carry–out.
Logic SymbolTruth Table

A B Cin S Cout
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
Logical Diagram 1 1 0 0 1
1 1 1 1 1

Logical Expression
The circuit implements the following two
expressions, where C is
the carry–in to the full adder.
Sum= · ·C + ·B· + A· · + A·B·C
Carry = A·B + A·C + B·C
Suppose we let the carry–in C = 0. Then =
1.
What we have then is as follows.
Sum = · ·0 + ·B·1 + A· ·1 + A·B·0
= ·B + A·
Carry = A·B + A·0 + B·0
= A·B
As expected, a full adder with carry–in set to
zero acts likes a half adder.
A full adder can be constructed from two half adders by connecting A and B to the input of one half adder,
connecting the sum from that to an input to the s econd adder, connecting the carry in, Cin, to the other input and
ORing the two half adder carry outputs to give the final carry output, C out.

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

HALF SUBTRACTOR
A Half Subtractor is a logic circuit that performs Binary subtraction. It accepts two input variables and produces
two output variables called the difference bit and borrow bit.
The binary subtraction is also performed by the Ex -OR gate with additional circuitry to perform the borrow
operation. Thus, a half subtractor is designed by an Ex -OR gate including AND gate with A input
complemented before fed to the gate.

Logical Expression
DIFFERENCE bit:
D =AB

BORROW bit
B = X.Y

…..………………………………………………………………………………………………………………….
FULL SUBTRACTOR
The Half Subtractor does not handle Borrow from the previous stage. The Full Subtractor accepts Borrow from
the previous stage, so it has three inputs Bin, A and B. It has two outputs D (Difference) and Bo (Borrow
Output).

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

…..………………………………………………………………………………………………………………….

Working of Adder/Subtractor with a neat diagram


 It is a logic circuit that can be used to perform both addition and subtraction. The circuit is laid from
right to left.
 The circuit can be designed by adding an Ex-OR gate with each full adder as shown in below figure.
 The adder/subtractor which has two 4 bit inputs as A3, A2, A1, A0 and B3, B2, B1, B0.

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

 The mode input control line M is connected with carry input of the least significant bit of the full adder.
This control line decides the type of operation, whether addition or subtract

When M= 1, the circuit is a subtractor and when M=0, the circuit becomes adder.
The Ex-OR gate consists of two inputs to which one is connected to the B and other to input M.
When M = 0, B Ex-OR of 0 produce B. Then full adders add the B with A with carry input zero and hence an
addition operation is performed.
When M = 1, B Ex-OR of 0 produce B complement and also carry input is 1. Hence the complemented B inputs
are added to A and 1 is added through the input carry, nothing but a 2’s complement operation. Therefore, the
subtraction operation is performed.

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

INTRODUCTION TO COMPUTER ARCHITECTURE

What is Computer Architecture?


Computer Architecture or digital computer organization describes the design and operational structure of a
computer system.
It can also be defined as the art and science of selecting and interconnecting hardware components to create
computers that meet functional, performance and cost goals.

There are two types of Computer Architecture


1. Von Neumann Architecture
2. Harvard Architecture

Von Neumann Architecture


A mathematician called John Von Neumann described the basic arrangement (or architecture) of a computer.
Most computers today follow the concept that he described although there are other types of architecture .

Arithmetic logic unit - This is the part of the CPU performs arithmetic and logic operations. The ALU has 3
sections, the Register, the ALU circuitry and the pathways in between.
Register is basically a storage cell which holds information such as the address of the instructions and results of
the calculations.
ALU circuitryIt actually performs calculations and is designed from AND, OR and NOT gates just as a chip.
Pathways in between are for electric current within ALU.

Main Memory (RAM)–Main memory is volatile which means the information will be lost without constant
flow of electricity; hence it is called a temporary storage device. Main memory can be seen as a sequence of
cells. Each cell has its own unique address so that the data can be fetched.
Input/ Output -Computers can only interact with the world using input and output devices. Inputs receive data
for the computer and outputs send information from the computer.
Control Unit - The control unit is in charge of ‘fetching’ each instruction that needs to be executed in a
program by issuing control signals to the hardware. It then decodes the instruction and finally issues more
control signals to the hardware to actually execute it.

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

Harvard Architecture

Harvard architecture is computer architecture with physically separate storage and signal pathways for
instructions and data. The term originated from the Harvard Mark I relay-based computer, which stored
instructions on punched tape (24 bits wide) and data in electro-mechanical counters (23 digits wide). These
early machines had limited data storage, entirely contained within the CPU, and provided no access to the
instruction storage as data, making loading and modifying programs tedious.

Comparison between Von Neumann and Harvard Architecture

Von Neumann Architecture Harvard Architecture


Programs and data are stored in the same memory and Programs and data are stored and handled in different
managed by same information handling system. systems.
Increased efficiency in designing and operating one Inefficient systems, as data and program handling
memory system. tasks are different.
Can be slow because data and programs are stored in Can be much faster because data and programs are
same memory. stored in different memory.
Desktop personal Computer Microcontroller based systems.

LOGIC GATES

1. What are Logic gates?


Logic gates are electronic circuits that perform logical operations. Logic gates are circuit made of Transistor,
Diode and Resistor.A logic gate can have more than one input but only one output.

2. Derive basic/simple logic gates with its definition, logic symbol, truth table and expression?
The three basic logic operations are NOT, ANDandOR
NOT Gate (Inverter)
Definition: NOT gate is a logic gate that changes a 0 input to 1 and a 1 input to 0. NOT gate also called the
Inverter performs the operation called Inversion or Complement or Negation.

Truth Table
Logic Symbol:
̅
Y A Expression: Y= ̅A

0 1
Application:
NOT gate can be used to find 1’s complement of an 1 0
8-bit binary number (byte of data)

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

AND Gate (Multiplication)


Definition: AND gate is a logic gate which performs logical multiplication. The output is HIGH (1) only if both
inputs are HIGH (1). Otherwise, output is LOW (0).

A B Y=A.B Expression: Y= A.B

0 0 0

0 1 0
Application: AND gate is commonly used to enable
Passage of signal (pulse waveform) from one point 1 0 0
toanother.
1 1 1

OR Gate (Addition)
Definition: OR gate is a logic gate which performs logical addition. The output is HIGH (1) if any one of its
inputs is HIGH (1). The output will be low only if both the inputs are low.

A B Y=A+B
Expression: Y= A+B
0 0 0

0 1 1
Application: OR gate is used in intrusion detection
and alarm system. 1 0 1

1 1 1
3. Derive compound logic gates with its definition, logic symbol, truth table and expression?
NAND and NOR are compound logic gates.
NAND Gate
Definition: NAND is a combination of both AND and NOT gate. It operates the same as an AND gate but the
output will be opposite. The output is HIGH (1) only if both inputs are LOW (0).

A B Y=A.B
0 0 1
Expression: Y= A.B
0 1 1

1 0 1

1 1 0

NOR Gate
Definition: NOR is a combination of both OR and NOT gate. It operates the same as an OR gate but the output
will be opposite. The output is HIGH (1) if all its inputs are LOW (0), the output is LOW (0) if either of the
inputs or all its inputs are HIGH (1).

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

A B Y=A+B
Expression: Y= A+B
0 0 1

0 1 0

1 0 0

1 1 0

4. Explain XOR and XNOR logic gates with its definition, logic symbol, truth table and expression?
XOR Gate
Definition: The exclusive OR gate is a modified OR gate. The XOR gate produces a high outputwhen both its
inputs are different. If the inputs are the same, the output is a low.

A B Y=A B
Expression:
0 0 0

0 1 1 Y= A . B + A . B

1 0 1

1 1 0

Universal property of NAND and NOR Gates

Universal property of NAND Gate

NAND as NOT Gate


All NAND input pins connect to the input signal A which gives an output A

NAND as AND Gate


The AND is replaced by a NAND gate with its output complemented by a NAND gate inverter

NAND as OR Gate
The OR gate is replaced by a NAND gate with all its inputs com plemented by NAND gate inverter

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

NAND as X-OR Gate


The X-OR gate is replaced by a NAND gate with all its inputs com
complemented
plemented by NAND gate inverter

NAND as X-NOR Gate


The X-NOR gate is replaced by a NAND gate with all its inputs com plemented by NAND gate inverter
complemented

Universal property of NOR Gate

NOR as NOT Gate


A NOT gate is equivalent to an inverted-input NOR gate.

NOR as AND Gate


The AND is replaced by a NOR gate with its output complemented by a NOR gate inverter

File Downloaded From www.Bustudymate.in


File Downloaded From www.Bustudymate.in

NOR as OR Gate
The OR is replaced by a NOR gate with its output complemented by a NOR gate inverter

NOR as X-OR Gate


The X-OR gate is replaced by a NOR gate with all its inputs complemented by NOR gate inverter

NOR as X-NOR Gate


The X-NOR gate is replaced by a NOR gate with all its inputs complemented by NOR gate inverter

File Downloaded From www.Bustudymate.in

You might also like