Fundamentals of Computing: Followinga Set Produces (Output)
Fundamentals of Computing: Followinga Set Produces (Output)
Fundamentals of Computing: Followinga Set Produces (Output)
Fundamentals of Computing
"Conuters are uscless. Ther can onhv gie you answers. Pablo Picasso
0.1What is a Computer?
an advanced clectronic machine that takes raw data from the user as input, stores
Acomputer is
and processesit followinga
set of instructions that produces some result (output). Processing is
Jsne hy electronic processors which come in the form of micro-chips. A computer can work as
a some instructions stored in its memory that direct the processors.
a computer that we can touch and see, such as CPU (Central Processing
The physical parts of program
1init) Monitor. Keyboard, Mouse etc., are called Hardware. The instructions are called
or code or
software.
0.2 Hardware
Computer Architecture and Organization
Computer Organization is concerned with the way the hardware components are connected to
assumed to be in
form a computer system and the way they operate. The various components are
place and the task is to investigate the organizational structure to verify that the computer parts
operate as intended.
specifications of the various
The architecture of a computer system is concerned with the
functional modules, such as processors and memory units, and structuring them together into a
computer system.
According to von Neumann
The modern computers are based on von Neumann Architecture.
Architecture, the basic structure of a computer should consist of the following components.
Input/ Output Unit
Arithmetic Logic Unit (ALU)
Control Unit (CU)
Storage/ Memory Unit
Bus
Input Unit
Input unit takes data and instructions from the user to interact with the computer system. The
input devices are Keyboard, Mouse etc.
ofComput
Fundamentals {
2Cheries 0
Computing
Output Dnit cnptstion - the data and instructions to the usr
the reults of The
tprvsstes
are Montn Irinte
Bandwidth, cxpresscdin units ofbits per second (bps), mcasures the capacity
called.throughput).
www.phy.ornl.gov/csep]
ofthe bus. (Source:
Computer Architecture
Big. 1: Block Diagram for
Storage Unit
Secondary
Storage
Output Information
Input Unit
Data Unit
Primary
Storage
Control Unit
(CU)
0.3 Software
to instruct the processors. But the processors do not
To make the computers to do their job means
programming languages evolved
understand human language. So, there are various computer or machine.
interact with the
which are compiled or translated or interpreted to
There are two major types of computer languages:
Low-level language
High-level language
extensive knowledge in
Low-level languages are closer to the way a machine works. VWe require
hardware and understanding of the configurations to deal with them. Low-level languages are
further divided into Assenbly language and Machine language.
f
Funda mentals o
4/Chapter
0.
a computer,
made of
Comput
logic
ing
processorsiN gates
oftwo kinds, let us say I (or
Theclectronic
signalshigh orlow.
So,the signals
when
and 0. switches) Can
fed into a
1100110. The
sequences of such
codes
computer,
it um eN
convertintoclectrical
0.3.1 Machine Language
signals. The clcctrical signals are necessary; for rwoecrokginngzS hsehc.
oi
Computing |5
Funda mentals of
fraction,
Fora binary
=1x2' + 1x22 + 0X2' + 1x 2'+1 x2-1,+1x2-2
1101. 11,
number is important.
that the position of a digitin a Certain
diwegtignt Sig
It is obvious
in a number. Note that the right most position of a is
cach position of a digit in
called Least Significant Digit (LSD). The digit in a
lowest wejghtage and is
position has maximum weightage andis thus calledI Most Significant Digit (MSD).the
the urib:
extren.
binary number, theebit (0or 1) on the right
most position is called the Least Significa:
For a
(LSB) and the bit on the extreme left position is called the Most Significant Bit (MSB).
0.7500x2 0.5000 1
LSB
0.5000x2 0.0000
and offintS
As said, Binary is the the oneverything
numbering system that computers use to represent level,
electronic circuits with this Ongates.
in computer is based onlogic and On' is I and'Off
Off paradigm. Theissignals
0. At the
prmary
verypass or don'tpass.
either
Funda mentaIs of Computing |7
follow a
to note that the binary numbers made with two digits I and 0,
Now, itis interesting known as Boolean Algebra.
diflerent kind of algebra. If is
Boolean Laws: = 1 (OR Gate)
0, 1, + 1 = 1, 1 + 0 = 0 + 1
0 +0 = (AND Gate)
1, 1.0 = 0.1 = 0
0.0 = 0, 1.1 = (NOT Gate)
1=0, 0 =1
that the computer processors are made of.
AND, OR, NOT are logic gates
values. So.
termed as 'A'. It is clear that A =1or 0, either of the two
Suppose asignal is A). That means, if A is True, A
(Complement of
symbolically, if we write A = 1, then A =0 complement)
and vice versa. A is NOT A. So, we can write, A = A. (Complement of
is False
the following generalBoolean
rules:
We can construct a truth table with A+ A = 4, A +A = 1
A +0= 4,
A+1= 1,
A.A = 0
A.1 = A, A.0 = 0,
basic laws of operations between digits. A binary number is a string of
So. the above are the binary numbers (such as 110 + 111) can
be
mathematical operations between
binary digits. The subtracting, and
with the above laws and there are some efficient ways of adding,
computed resources in
binary numbers. You can look up any Digital Electronics book or the
multiplying give detail here as that will be of no
direct
We will not
internet to get to know the details of that.
in this book.
use for our subsequent discussions
1, 11110011,...]
1 byte =Collection of8 bits [For example, 1100100
One byte can store one character, e.g., Xor'@', or M...
The 'byte' was first named in 1956, during the design of an IBM computer.
Information content in a byte
2° =
Let us think of one byte which consists of 8 digits (of two kinds: 0 and 1). So, there can be
256 different combinations. If we now consider acombination as a piece of information, then
we can have 256 different kinds of informationby a single byte!
8|Chapter 0. Fun damentals of
0, 1
to
left most position is used to represent a positive number and 1 is
convention, 0onthe binary number (positive or negative), the left most
Bv number. So, in a signed
representa negative magnitude.
for sign and the rest are for
bit is
done by
the additions and subtractions of binary number are efficiently
As
mentioned carlier,
l's or 2's compliment methods. We are not going to describe those
called
somespecialItechniques book on Digital Electronics for details.
here. Y'ou can consult any
nowadays have 32-bit or 64-bit processors. That
and laptops
Most Desktop Computers (PC) process a 32 bitor 64 bit long binary string at a time. So, to
can time
means, the computer processor bits. The number of bits that are processed at a
32 bits or 64
thecomputer. the word length is are the "letters for a computer word!
where the bits
iscalled a computer word,
bytes (32 bits)or 8 bytes (64 bits). For example, with 4
Integers are typically stored with either 4 numbers, counting from 0 to
4294967295, if
4294967296 diferent
bvtes, we can store 23 = and negative numbers both,
we can then store
accommodate positive
all positive. Since. we must
-2147483648 and 2147483647.
numbers between
or Float
0.4.2 Floating Point Number
can be positive or negative. Numbers with decimal places
Integers are whole numbers and
or just '£loat' in computer teminology.
(tractional part) are called floating point numbers
-5.5 are all floating-point numbers.
For example. 0.5698, 1594.1237642,
represent a floating-point number, we used a dot (. ) which separated the fractional part from
To point. In case of decimal
we call this radix
the integer part. In mathematics and in computing, radix point equally applies
numbers that we usually use, it is known as decimal point. To note, this (,) is
countries, acomma
to binary numbers and it is called binarn point. [Note that in some
put on the baseline to denote a radix point.]
Comp#0
mentals o|
Funda
Z|Chapter 0,
ndstuc to the ue
dta
Output Unit lconputation- the
results of
It providesthePrintere:
are Monitor, When e
pertiwd by AU
Unit (ALU) cakulationsare
Arithmetic Logie
mathematical andlogical storage uit.
Allthe esult is transtemd to the
done, the
Ntoage mit and back.
Control Unit instruetions tion ALUo
of data and
It controlsthe tlow
Central
Central Processing
Unit
unit together is valled the
CPU: Control
Arithmetic Logic unit and the
The brain of a computer!
(CPU).It is like the
and intercdiate reNults are Ntod
Storage Unit Input d:ata
holdsthe data and instructions. storage Or memorY
units:
This unit main categories ofthe
future use. There are two
Memory. sIwitehed ofl, the dala
RAM: Random Access the computer is
of data. When
This is used for temporary storage Also, there are ditlerent (ypCs oRAM availablc
storage.
is lost. RAM is used as primary
(Dynamic Random Access Memory), used in nost persOnal
DRAM
computers
more volatile that DRAMI,
} SRAM (Static Random Access Memory), faster and
but requires more power to operate.
SDRM (Synchronous Dynamie Random Access Memory), a type of DRAM
that has higher processing specd.