0% found this document useful (0 votes)
4 views

CSC 303

The document outlines the concepts of computer architecture and organization, detailing their distinctions and roles in computer systems. It discusses the five generations of computers, highlighting their technological advancements and characteristics from vacuum tubes to ultra-large scale integration. Additionally, it classifies computers based on various criteria such as operating principles, size, and user capacity, providing examples for each category.

Uploaded by

mohammedbala843
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

CSC 303

The document outlines the concepts of computer architecture and organization, detailing their distinctions and roles in computer systems. It discusses the five generations of computers, highlighting their technological advancements and characteristics from vacuum tubes to ultra-large scale integration. Additionally, it classifies computers based on various criteria such as operating principles, size, and user capacity, providing examples for each category.

Uploaded by

mohammedbala843
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Computer Architecture:

Computer Architecture deals with giving operational attributes of the computer or Processor
to be specific. It deals with details like physical memory, ISA (Instruction Set Architecture) of
the processor, the number of bits used to represent the data types, Input Output mechanism
and technique for addressing memories.

Computer Organization:
Computer Organization is realization of what is specified by the computer architecture. It deals
with how operational attributes are linked together to meet the requirements specified by
computer architecture. Some organizational attributes are hardware details, control signals,
peripherals.
EXAMPLE:
Say you are in a company that manufactures cars, design and all low-level details of the car
come under computer architecture (abstract, programmers view), while making it’s parts
piece by piece and connecting together the different components of that car by keeping the
basic design in mind comes under computer organization (physical and visible).

Computer Architecture
Computer Organization

Computer architecture (a bit higher level)


Often called microarchitecture (low level)

Programmer view (i.e. Programmer has


Transparent from programmer (ex. a
to be aware of which instruction set used)
programmer does not worry much how
addition is implemented in hardware)
Logic (Instruction set,
Physical components (Circuit design,
Addressing modes, Data types, Cache
Adders, Signals, Peripherals)
optimization)
What to do ? (Instruction set)
How to do ? (implementation of the
architecture)
GENERATIONS OF A COMPUTER
Generation in computer terminology is a change in technology a computer is/was being
used. Initially, the generation term was used to distinguish between varying hardware
technologies. But nowadays, generation includes both hardware and software, which
together make up an entire computer system.
There are totally five computer generations known till date. Each generation has been
discussed in detail along with their time period and characteristics. Here approximate dates
against each generations have been mentioned which are normally accepted.
Following are the main five generations of computers

S.N. Generation & Description

First Generation
1
The period of first generation: 1946-1959. Vacuum tube based.

Second Generation
2
The period of second generation: 1959-1965. Transistor based.

Third Generation
3
The period of third generation: 1965-1971. Integrated Circuit based.

Fourth Generation
4
The period of fourth generation: 1971-1980. VLSI microprocessor based.

Fifth Generation
5
The period of fifth generation: 1980-onwards. ULSI microprocessor based
First generation

The period of first generation was 1946-1959. The computers of first generation used vacuum
tubes as the basic components for memory and circuitry for CPU (Central Processing Unit). These
tubes, like electric bulbs, produced a lot of heat and were prone to frequent fusing of the
installations, therefore, were very expensive and could be afforded only by very large
organizations. In this generation mainly batch processing operating system were used. Punched
cards, paper tape, and magnetic tape were used as input and output devices. The computers in this
generation used machine code as programming language.

The main features of first generation are:


• Vacuum tube technology
• Unreliable
• Supported machine language only
• Very costly
• Generated lot of heat
• Slow input and output devices
• Huge size
• Need of A.C.
• Non-portable
• Consumed lot of electricity

Some computers of this generation were: ENIAC, EDVAC, UNIVAC, IBM-701, IBM-650
Second generation
The period of second generation was 1959-1965. In this generation transistors were used
that were cheaper, consumed less power, more compact in size, more reliable and faster
than the first generation machines made of vacuum tubes. In this generation, magnetic cores
were used as primary memory and magnetic tape and magnetic disks as secondary storage
devices. In this generation assembly language and high-level programming languages like
FORTRAN, COBOL were used. The computers used batch processing and multiprogramming
operating system.

The main features of second generation are:


• Use of transistors
• Reliable in comparison to first generation computers
• Smaller size as compared to first generation computers
• Generated less heat as compared to first generation computers
• Consumed less electricity as compared to first generation computers
• Faster than first generation computers
• Still very costly
• A.C. needed
• Supported machine and assembly languages
Some computers of this generation were:
• IBM 1620
• IBM 7094
• CDC 1604
• CDC 3600
• UNIVAC 1108
Third generation

The period of third generation was 1965-1971. The computers of third generation used integrated
circuits (IC's) in place of transistors. A single IC has many transistors, resistors and capacitors
along with the associated circuitry. The IC was invented by Jack Kilby. This development made
computers smaller in size, reliable and efficient. In this generation remote processing, time-
sharing, multi-programming operating system were used. High- level languages (FORTRAN-II
TO IV, COBOL, PASCAL PL/1, BASIC, ALGOL-68 etc.) were used during this generation.

The main features of third generation are:


• IC used
• More reliable in comparison to previous two generations
• Smaller size
• Generated less heat
• Faster
• Lesser maintenance
• Still costly
• A.C needed
• Consumed lesser electricity
• Supported high-level language
Some computers of this generation were:
• IBM-360 series
• Honeywell-6000 series
• PDP(Personal Data Processor)
• IBM-370/168
• TDC-316
Fourth generation

The period of fourth generation was 1971-1980. The computers of fourth generation used Very
Large Scale Integrated (VLSI) circuits. VLSI circuits having about 5000 transistors and other
circuit elements and their associated circuits on a single chip made it possible to have
microcomputers of fourth generation. Fourth generation computers became more powerful,
compact, reliable, and affordable. As a result, it gave rise to personal computer (PC) revolution.
In this generation time sharing, real time, networks, distributed operating system were used. All
the high-level languages like C, C++, DBASE etc., were used in this generation.

The main features of fourth generation are:


• VLSI technology used
• Very cheap
• Portable and reliable
• Use of PC's
• Very small size
• Pipeline processing
• No A.C. needed
• Concept of internet was introduced
• Great developments in the fields of networks
• Computers became easily available
Some computers of this generation were:
• DEC 10
• STAR 1000
• PDP 11
• CRAY-1(Super Computer)
• CRAY-X-MP(Super Computer)
Fifth generation

The period of fifth generation is 1980-till date. In the fifth generation, the VLSI technology
became ULSI (Ultra Large Scale Integration) technology, resulting in the production of
microprocessor chips having ten million electronic components. This generation is based on
parallel processing hardware and AI (Artificial Intelligence) software. AI is an emerging branch
in computer science, which interprets means and method of making computers think like human
beings. All the high-level languages like C and C++, Java, .Net etc., are used in this generation.
AI includes:
• Robotics
• Neural Networks
• Game Playing
• Development of expert systems to make decisions in real life situations.
• Natural language understanding and generation.

The main features of fifth generation are:


• ULSI technology
• Development of true artificial intelligence
• Development of Natural language processing
• Advancement in Parallel Processing
• Advancement in Superconductor technology
• More user friendly interfaces with multimedia features
• Availability of very powerful and compact computers at cheaper rates
Some computer types of this generation are:
• Desktop
• Laptop
• NoteBook
• UltraBook
COMPUTER TYPES
A computer can be defined as a fast electronic calculating machine that accepts the (data)
digitized input information process it as per the list of internally stored instructions and
produces the resulting information. List of instructions are called programs & internal storage is
called computer memory.

The different types of computers are


1. Personal computers: - This is the most common type found in homes, schools,
Business offices etc., It is the most common type of desk top computers with
processing and storage units along with various input and output devices.
2. Note book computers: - These are compact and portable versions of PC
3. Work stations: - These have high resolution input/output (I/O) graphics capability,
but with same dimensions as that of desktop computer. These are used in engineering
applications of interactive design work.
4. Enterprise systems: - These are used for business data processing in medium to large
corporations that require much more computing power and storage capacity than
work stations. Internet associated with servers have become a dominant worldwide
source of all types of information.
5. Super computers: - These are used for large scale numerical calculations required in the
applications like weather forecasting etc.,

Different Classification of Computer


• Based on operating principles
• Based on size and capacity
• Based on microprocessors
• Based on word-length
• Based on number of users

Classification based on Operating Principles


Based on the operating principles, computers can be classified into one of the following types:
-
1) Digital Computers
2) Analog Computers
3) Hybrid Computers
Digital Computers: - Operate essentially by counting. All quantities are expressed as
discrete or numbers. Digital computers are useful for evaluating arithmetic expressions and
manipulations of data (such as preparation of bills, ledgers, solution of simultaneous
equations etc).

Analog Computers: An analog computer is a form of computer that uses the continuously
changeable aspects of physical phenomena such as electrical, mechanical, or hydraulic quantities
to model the problem being solved. In contrast, digital computers represent varying quantities
symbolically, as their numerical values change.

Hybrid Computers: - are computers that exhibit features of analog computers and digital
computers. The digital component normally serves as the controller and provides logical operations,
while the analog component normally serves as a solver of differential equations.
Classification digital Computer based on size and Capability
Based on size and capability, computers are broadly classified into

Micro Computers (Personal Computer)


A microcomputer is the smallest general- p u r p o s e processing system. The older pc started
8 bit processor with speed of 3.7MB and current pc 64 bit processor with speed of 4.66 GB.
Examples: - IBM PCs, APPLE computers
Microcomputer can be classified into 2 types:
1. Desktops
2. Portables
The difference is portables can be used while travelling whereas desktops computers cannot
be carried around.

The different portable computers are: -


1) Laptop
2) Notebooks
3) Palmtop (hand held)
4) Wearable computers

Laptop: - this computer is similar to a desktop computers but the size is smaller. They are
expensive than desktop. The weight of laptop is around 3 to 5 kg.
Notebook: - These computers are as powerful as desktop but size of these computers are
comparatively smaller than laptop and desktop. They weigh 2 to 3 kg. They are more costly than
laptop.

Palmtop (Hand held): - They are also called as personal Digital Assistant (PDA). These
computers are small in size. They can be held in hands. It is capable of doing word processing,
spreadsheets and hand writing recognition, game playing, faxing and paging. These
computers are not as powerful as desktop computers. Ex: - 3com palmV.

Wearable computer: - The size of this computer is very small so that it can be worn on the
body. It has smaller processing power. It is used in the field of medicine. For example, pace
maker to correct the heart beats. Insulin meter to find the levels of insulin in the blood.
a) Workstations:- It is used in large, high-resolution graphics screen built in network support,
Engineering applications(CAD/CAM), software development desktop publishing

Ex: Unix and windows NT.

b) Minicomputer: - A minicomputer is a medium-sized computer. That is more powerful


than a microcomputer. These computers are usually designed to serve multiple users
simultaneously (Parallel Processing). They are more expensive than microcomputers.

Examples: Digital Alpha, Sun Ultra.

c) Mainframe (Enterprise) computers: - Computers with large storage capacities and


very high speed of processing (compared to mini- or microcomputers) are known as
mainframe computers. They support a large number of terminals for simultaneous use by a
number of users like ATM transactions. They are also used as central host computers in
distributed data processing system.
Examples: - IBM 370, S/390.
d) Supercomputer: - Supercomputers have extremely large storage capacity and
computing speeds which are many times faster than other computers. A supercomputer is
measured in terms of tens of millions Instructions per second (mips), an operation is made up of
numerous instructions. The supercomputer is mainly used for large scale numerical problems in
scientific and engineering disciplines such as Weather analysis.
Examples: - IBM Deep Blue

Classification based on number of microprocessors


Based on the number of microprocessors, computers can be classified into
a) Sequential computers and
b) Parallel computers
b) Sequential computers: - Any task complete in sequential computers is with one
microcomputer only. Most of the computers (today) we see are sequential computers where
in any task is completed sequentially instruction after instruction from the beginning to the
end.
c) Parallel computers: - The parallel computer is relatively fast. New types of computers that use a
large number of processors. The processors perform different tasks independently and simultaneously thus
improving the speed of execution of complex programs dramatically. Parallel computers match the speed of
supercomputers at a fraction of the cost.
Classification based on word-length
A binary digit is called “BIT”. A word is a group of bits which is fixed for a computer.
The number of bits in a word (or word length) determines the representation of all characters in
these many bits. Word length leis in the range from 16-bit to 64-bitsf or most computers of today.
Classification based on number of users
Based on number of users, computers are classified into: -
Single User: - Only one user can use the resource at any time.

Multi User: - A single computer shared by a number of users at


any time.

Network: - A number of interconnected autonomous computers shared by a


number of users at any time.
The first phase of the lectures we discussed the fascinating journey of computer evolution through
different generations. Each generation marks a significant advancement in technology, shaping the way
we interact with and utilize computers in our daily lives. From the bulky vacuum tube-based machines
of the first generation to the ultra-powerful and compact devices of the fifth generation, this chapter
explores the key characteristics, innovations, and impact of each era in computer history.

Now we will be discussing the general system architecture. Let’s have a recap of the meanings of
computer architecture and organisation

In general terms, the architecture of a computer system can be considered as a catalogue of tools or
attributes that are visible to the user such as instruction sets, number of bits used for data, addressing
techniques, etc.

Whereas, Organization of a computer system defines the way system is structured so that all those
catalogued tools can be used. The significant components of Computer organization are ALU, CPU,
memory and memory organization.

General System Architecture


In Computer Architecture, the General System Architecture is divided into two major classification units.

1. Store Program Control Concept


2. Flynn's Classification of Computers
Flynn's Classification of Computers
M.J. Flynn proposed a classification for the organization of a computer system by the number of
instructions and data items that are manipulated simultaneously.

The sequence of instructions read from memory constitutes an instruction stream.

The operations performed on the data in the processor constitute a data stream.

Note: The term 'Stream' refers to the flow of instructions or data.

Parallel processing may occur in the instruction stream, in the data stream, or both.

Flynn's classification divides computers into four major groups that are:
1. Single instruction stream, single data stream (SISD)
2. Single instruction stream, multiple data stream (SIMD)
3. Multiple instruction stream, single data stream (MISD)
4. Multiple instruction stream, multiple data stream (MIMD)

SISD
SISD stands for 'Single Instruction and Single Data Stream'. It represents the organization of a single
computer containing a control unit, a processor unit, and a memory unit. Instructions are executed
sequentially, and the system may or may not have internal parallel processing capabilities.

Most conventional computers have SISD architecture like the traditional Von-Neumann computers.

Parallel processing, in this case, may be achieved by means of multiple functional units or by pipeline
processing.
Where, CU = Control Unit, PE = Processing Element, M = Memory

Instructions are decoded by the Control Unit and then the Control Unit sends the instructions to the
processing units for execution. Data Stream flows between the processors and memory bi-directionally.

Examples: Older generation computers, minicomputers, and workstations

SIMD
SIMD stands for 'Single Instruction and Multiple Data Stream'. It represents an organization that
includes many processing units under the supervision of a common control unit.

All processors receive the same instruction from the control unit but operate on different items of data.

The shared memory unit must contain multiple modules so that it can communicate with all the
processors simultaneously.

SIMD is mainly dedicated to array processing machines. However, vector processors can also be seen
as a part of this group.
MISD
MISD stands for 'Multiple Instruction and Single Data stream'.

MISD structure is only of theoretical interest since no practical system has been constructed using this
organization.

In MISD, multiple processing units operate on one single-data stream. Each processing unit operates on
the data independently via separate instruction stream.

Where, M = Memory Modules, CU = Control Unit, P = Processor Units

Example: The experimental Carnegie-Mellon C.mmp computer (1971)

MIMD
MIMD stands for 'Multiple Instruction and Multiple Data Stream'.

In this organization, all processors in a parallel computer can execute different instructions and operate
on various data at the same time.

In MIMD, each processor has a separate program and an instruction stream is generated from each
program.

Where, M = Memory Module, PE = Processing Element, and CU = Control Unit

Examples: Cray T90, Cray T3E, IBM-SP2


Stored Program Concept can be further classified in three basic ways:
1. Von-Neumann Model
2. General Purpose System
3. Parallel Processing

The term Stored Program Control Concept refers to the storage of instructions in computer memory
to enable it to perform a variety of tasks in sequence or intermittently. The idea was introduced in the
late 1040s by John von Neumann.

ENIAC (Electronic Numerical Integrator and Computer) was the first computing system designed
in the early 1940s. It was based on Stored Program Concept in which machine use memory for processing
data.

Von-Neumann Model
Von-Neumann proposed his computer architecture design in 1945 which was later known as Von-
Neumann Architecture. It consisted of a Control Unit, Arithmetic, and Logical Memory Unit (ALU),
Registers and Inputs/Outputs.

Von Neumann architecture is based on the stored-program computer concept, where instruction data and
program data are stored in the same memory. This design is still used in most computers produced today.

A Von Neumann-based computer:


o Uses a single processor
o Uses one memory for both instructions and data.
o Executes programs following the fetch-decode-execute cycle
Components of Von-Neumann Model:
o Central Processing Unit
o Buses
o Memory Unit

Central Processing Unit


The part of the Computer that performs the bulk of data processing operations is called the Central
Processing Unit and is referred to as the CPU.

The Central Processing Unit can also be defined as an electric circuit responsible for executing the
instructions of a computer program. The CPU performs a variety of functions dictated by the type of
instructions that are incorporated in the computer.

The major components of CPU are

1. Arithmetic and Logic Unit (ALU),


2. Control Unit (CU)
3. and a variety of registers.
Arithmetic and Logic Unit (ALU): The Arithmetic and Logic Unit (ALU) performs the required
micro-operations for executing the instructions. In simple words, ALU allows arithmetic (add, subtract,
etc.) and logic (AND, OR, NOT, etc.) operations to be carried out.

Control Unit: The Control Unit of a computer system controls the operations of components like ALU,
memory and input/output devices.

The Control Unit consists of a program counter that contains the address of the instructions to be fetched
and an instruction register into which instructions are fetched from memory for execution.

Registers: Registers refer to high-speed storage areas in the CPU. The data processed by the CPU are
fetched from the registers.

Following is the list of registers that plays a crucial role in data processing.

Registers Description

MAR (Memory Address This register holds the memory location of the data that needs to be
Register) accessed.

MDR (Memory Data Register) This register holds the data that is being transferred to or from
memory.

AC (Accumulator) This register holds the intermediate arithmetic and logic results.

PC (Program Counter) This register contains the address of the next instruction to be
executed.

CIR (Current Instruction This register contains the current instruction during processing.
Register)

Memory Unit
A memory unit is a collection of storage cells together with associated circuits needed to transfer
information in and out of the storage. The memory stores binary information in groups of bits called
words. The internal structure of a memory unit is specified by the number of words it contains and the
number of bits in each word.

Two major types of memories are used in computer systems:

1. RAM (Random Access Memory)


2. ROM (Read-Only Memory)

Buses
Buses are the means by which information is shared between the registers in a multiple-register
configuration system.
A bus structure consists of a set of common lines, one for each bit of a register, through which binary
information is transferred one at a time. Control signals determine which register is selected by the bus
during each particular register transfer.

Von-Neumann Architecture comprised of three major bus systems for data transfer.

Bus Description

Address Address Bus carries the address of data (but not the data) between the processor and the
Bus memory.

Data Bus Data Bus carries data between the processor, the memory unit and the input/output
devices.

Control Bus Control Bus carries signals/commands from the CPU.

Data Representation
Registers are made up of flip-flops and flip-flops are two-state devices that can store only 1’s
and 0’s.

There are many methods or techniques which can be used to convert numbers from one
base to another. We'll demonstrate here the following −
• Decimal to Other Base System
• Other Base System to Decimal
• Other Base System to Non-Decimal
• Shortcut method − Binary to Octal
• Shortcut method − Octal to Binary
• Shortcut method − Binary to Hexadecimal
• Shortcut method − Hexadecimal to Binary
Decimal toOther Base System
Steps
• Step 1 − Divide the decimal number to be converted by the value of the new base.
• Step 2 − Get the remainder from Step 1 as the rightmost digit (least significant digit)
of new base number.
• Step 3 − Divide the quotient of the previous divide by the new base.
• Step 4 − Record the remainder from Step 3 as the next digit (to the left) of the new
base number.
Repeat Steps 3 and 4, getting remainders from right to left, until the quotient becomes zero
in Step 3.
The last remainder thus obtained will be the Most Significant Digit (MSD) of the new base
number.
Example −
Decimal Number: 2910
Calculating Binary Equivalent

Step Operation Result Remainder

Step 1 29 / 2 14 1

Step 2 14 / 2 7 0

Step 3 7/2 3 1

Step 4 3/2 1 1

Step 5 1/2 0 1
As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so
that the first remainder becomes the Least Significant Digit (LSD) and the last remainder
becomes the Most Significant Digit (MSD).
Decimal Number − 2910 = Binary Number − 111012.
Other Base Systemto Decimal System
Steps
• Step 1 − Determine the column (positional) value of each digit (this depends on the
position of the digit and the base of the number system).
• Step 2 − Multiply the obtained column values (in Step 1) by the digits in the
corresponding columns.
• Step 3 − Sum the products calculated in Step 2. The total is the equivalent value in
decimal.

Step Binary Number Decimal Number

Step 1 111012 ((1 × 2 ) + (1 × 2 ) + (1 × 2 ) + (0 × 2 ) + (1 × 2 ))10


4 3 2 1 0

Step 2 111012 (16 + 8 + 4 + 0 + 1)10

Step 3 111012 2910

Example
Binary Number − 111012
Calculating Decimal Equivalent −
Binary Number − 111012 = Decimal Number − 2910
Other Base System to Non-Decimal System
Steps
• Step 1 − Convert the original number to a decimal number (base 10).
• Step 2 − Convert the decimal number so obtained to the new base number.
Example
Octal Number − 258
Calculating Binary Equivalent −
Step 1 − Convert to Decimal

Step Octal Number Decimal Number

Step 1 258 ((2 × 8 ) + (5 × 8 ))10


1 0
Step 2 258 (16 + 5 )10

Step 3 258 2110

Octal Number − 258 = Decimal Number − 2110


Step 2 − Convert Decimal to Binary

Step Operation Result Remainder

Step 1 21 / 2 10 1

Step 2 10 / 2 5 0

Step 3 5/2 2 1

Step 4 2/2 1 0

Step 5 1/2 0 1

Decimal Number − 2110 = Binary Number − 101012


Octal Number − 258 = Binary Number − 101012
Shortcut method- Binary to Octal
Steps
• Step 1 − Divide the binary digits into groups of three (starting from the right).
• Step 2 − Convert each group of three binary digits to one octal digit.
Example
Binary Number − 101012
Calculating Octal Equivalent −

Step Binary Number Octal Number

Step 1 101012 010 101

Step 2 101012 28 58

Step 3 101012 258


Binary Number − 101012 = Octal Number − 258
Shortcut method- Octal to Binary
Steps
• Step 1 − Convert each octal digit to a 3-digit binary number (the octal digits may
be treated as decimal for this conversion).
• Step 2 − Combine all the resulting binary groups (of 3 digits each) into a single binary
number.
Example
Octal Number − 258
Calculating Binary Equivalent −

Step Octal Number Binary Number

Step 1 258 210 510

Step 2 258 0102 1012

Step 3 258 0101012

Octal Number − 258 = Binary Number − 101012


Shortcut method- Binary to Hexadecimal
Steps
• Step 1 − Divide the binary digits into groups of four (starting from the right).
• Step 2 − Convert each group of four binary digits to one hexadecimal symbol.

Example
Binary Number − 101012
Calculating hexadecimal Equivalent −

Step Binary Number Hexadecimal Number

Step 1 101012 0001 0101

Step 2 101012 110 510

Step 3 101012 1516


Binary Number − 101012 = Hexadecimal Number − 1516
Shortcutmethod- Hexadecimal to Binary
Steps
• Step 1 − Convert each hexadecimal digit to a 4 digit binary number (the hexadecimal
digits may be treated as decimal for this conversion).
• Step 2 − Combine all the resulting binary groups (of 4 digits each) into a single binary
number.
Example
Hexadecimal Number − 1516
Calculating Binary Equivalent −

Step Hexadecimal Number Binary Number

Step 1 1516 110 510

Step 2 1516 00012 01012

Step 3 1516 000101012

Hexadecimal Number − 1516 = Binary Number − 101012

Binary Coded Decimal(BCD) code


In this code each decimal digit is represented by a 4-bit binary number. BCD is a way to express
each of the decimal digits with a binary code. In the BCD, with four bits we can represent
sixteen numbers (0000 to 1111). But in BCD code only first ten of these are used (0000 to
1001). The remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.

Advantages of BCD Codes


• It is very similar to decimal system.
• We need to remember binary equivalent of decimal numbers 0 to 9 only.
Disadvantages of BCD Codes
• The addition and subtraction of BCD have different rules.
• The BCD arithmetic is little more complicated.
• BCD needs more number of bits than binary to represent the decimal number. So BCD
is less efficient than binary.

Alphanumeric codes
A binary digit or bit can represent only two symbols as it has only two states '0' or '1'. But this
is not enough for communication between two computers because there we need many more
symbols for communication. These symbols are required to represent 26 alphabets with
capital and small letters, numbers from 0 to 9, punctuation marks and other symbols.

The alphanumeric codes are the codes that represent numbers and alphabetic
characters. Mostly such codes also represent other characters such as symbol and various
instructions necessary for conveying information. An alphanumeric code should at least
represent 10 digits and 26 letters of alphabet i.e. total 36 items. The following three
alphanumeric codes are very commonly used for the data representation.
• American Standard Code for Information Interchange (ASCII).
• Extended Binary Coded Decimal Interchange Code (EBCDIC).
• Five bit Baudot Code.
ASCII code is a 7-bit code whereas EBCDIC is an 8-bit code. ASCII code is more commonly
used worldwide while EBCDIC is used primarily in large IBM computers.

Complement Arithmetic
Complements are used in the digital computers in order to simplify the subtraction operation
and for the logical manipulations. For each radix-r system (radix r represents base of number
system) there are two types of complements.

S.N. Complement Description

1 Radix Complement The radix complement is referred to as the r's


complement

2 Diminished Radix Complement The diminished radix complement is referred


to as the (r-1)'s complement

Binary system complements


As the binary system has base r = 2. So the two types of complements for the binary system
are 2's complement and 1's complement.

1'scomplement
The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is
called as taking complement or 1's complement. Example of 1's Complement is as follows.

2'scomplement
The 2's complement of binary number is obtained by adding 1 to the Least Significant Bit
(LSB) of 1's complement of the number.
2's complement = 1's complement + 1
Example of 2's Complement is as follows.

Binary Arithmetic
Binary arithmetic is essential part of all the digital computers and many other digital systems.
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.

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

Binary Division
Binary division is similar to decimal division. It is called as the long division

procedure. Example − Division


Revision: Boolean Algebra Truth Tables
Boolean Algebra is based around logical functions in which each Boolean
function, such as the logic AND function, typically has one or more input
values and produces an output result based on these input values. The inputs
have one of two values: 0 or 1.
In 1854, George Boole performed an investigation into the “laws of thought”
which were based around a simplified version of the “group” or “set” theory,
and from this Boolean Algebra was developed. Boolean Algebra deals mainly
with the theory that both logic and set operations are either “TRUE” or
“FALSE” but not both at the same time.
Boolean Algebra Expressions can be used to construct digital logic truth tables
for their respective functions
As well as a standard Boolean Expression, the input and output information of
any Logic Gate or circuit can be plotted into standard Boolean Algebra truth
tables to give a visual representation of the switching function of the system.
The table used to represent the Boolean expression of a logic gate function is
commonly called a Truth Table. A logic gate truth table shows each possible
input combination to the gate or circuit with the resultant output depending
upon the combination of these input(s).
For example, consider a single 2-input logic circuit with input variables
labelled as A and B. There are “four” possible input combinations or 2 of
2

“OFF” and “ON” for the two inputs. However, when dealing with Boolean
expressions and especially logic gate truth tables, we do not general use “ON”
or “OFF” but instead give them bit values which represent a logic level “1” or a
logic level “0” respectively.
Then the four possible combinations of A and B for a 2-input logic gate is given
as:
• Input Combination 1. – “OFF” – “OFF” or ( 0, 0 )
• Input Combination 2. – “OFF” – “ON” or ( 0, 1 )
• Input Combination 3. – “ON” – “OFF” or ( 1, 0 )
• Input Combination 4. – “ON” – “ON” or ( 1, 1 )
Therefore, a 3-input logic circuit would have 8 possible input combinations or
2 and a 4-input logic circuit would have 16 or 2 , and so on as the number of
3 4

inputs increases. Then a logic circuit with “n” number of inputs would
have 2 possible input combinations of both “OFF” and “ON”.
n
Boolean Algebra Truth Tables For A 2-input AND Gate
For a 2-input AND gate, the output Q is true if BOTH input A “AND”
input B are both true, giving the Boolean Expression of: ( Q = A and B ).

Symbol Truth Table

A B Q

0 0 0

0 1 0

1 0 0

1 1 1

Boolean Expression Q = A.B Read as A AND B gives Q

Note that the Boolean Expression for a two input AND gate can be written
as: A.B or just simply AB without the decimal point.
Boolean Algebra Truth Tables For A 2-input OR Gate
For a 2-input OR (Inclusive-OR) gate, the output Q is true if EITHER
input A “OR” input B is true, giving the Boolean Expression of: (Q = A or B).

Symbol Truth Table

A B Q

0 0 0

0 1 1

1 0 1

1 1 1

Boolean Expression Q = A+B Read as A OR B gives Q


Switch Representation of the AND Function

Here the two switches, A and B are connected together to form a series circuit.
Therefore, in the circuit above, both switch A AND switch B must be closed
(Logic “1”) in order to put the lamp on. In other words, both switches must be
closed, or at logic “1” for the lamp to be “ON”.
In Boolean Algebra terms the output will be TRUE only when all of its inputs
are TRUE. In electrical terms, the logic AND function is equal to a series circuit
as shown above.

Switch Representation of the OR Function

Here the two switches A and B are connected in parallel and either
Switch A OR Switch B can be closed in order to put the lamp on. In other
words, either switch can be closed, or at logic “1” for the lamp to be “ON”.
Boolean Algebra terms the output will be TRUE when any of its inputs
are TRUE. In electrical terms, the logic OR function is equal to a parallel
circuit.
Boolean Algebra Truth Tables For The NOT Gate
For a single input NOT (Inverter) gate, the output Q is ONLY true when the
input is “NOT” true, the output is the inverse or complement of the input giving
the Boolean Expression of: ( Q = NOT A ).

The NAND and the NOR Gates are a combination of the AND and OR Gates
respectively with that of a NOT Gate (inverter).

Switch Representation of the Logic NOT Function


2-input NAND (Not AND) Gate
For a 2-input NAND gate, the output Q is NOT true if BOTH input A and
input B are true, giving the Boolean Expression of: ( Q = not(A AND B) ).

2-input NOR (Not OR) Gate


For a 2-input NOR gate, the output Q is true if BOTH input A and input B are
NOT true, giving the Boolean Expression of: ( Q = not(A OR B) ).
As well as the standard logic gates there are also two special types of logic gate
function called an Exclusive-OR Gate and an Exclusive-NOR Gate. The
Boolean expression to indicate an Exclusive-OR or Exclusive-NOR function is
to a symbol with a plus sign inside a circle, ( ⊕ ).
The switching actions of both of these types of gates can be created using the
above standard logic gates. However, as they are widely used functions they are
now available in standard IC form and have been included here as reference.

2-input EX-OR (Exclusive OR) Gate


For a 2-input Ex-OR gate, the output Q is true if EITHER input A or if
input B is true, but NOT both giving the Boolean Expression of: ( Q = (A and
NOT B) or (NOT A and B) ).

2-input EX-NOR (Exclusive NOR) Gate


For a 2-input Ex-NOR gate, the output Q is true if BOTH input A and
input B are the same, either true or false, giving the Boolean Expression of: ( Q
= (A and B) or (NOT A and NOT B) ).
Summary of 2-input Logic Gates
The following Boolean Algebra Truth Tables compare the logical functions of
the 2-input logic gates above.
The following Boolean Algebra truth tables gives a list of the common logic
functions and their equivalent Boolean notation.

2-input logic gate truth tables are given here as examples of the operation of
each logic function, but there are many more logic gates with 3, 4 even 8
individual inputs. The multiple input gates are no different to the simple 2-input
gates above, So a 4-input AND gate would still require ALL 4-inputs to be
present to produce the required output at Q and its larger truth table would
reflect that.
Boolean Algebra Examples
Construct a Truth Table for the logical functions below

1.

2.

3.

You might also like