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

Computer fundamentals chapter 1

Uploaded by

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

Computer fundamentals chapter 1

Uploaded by

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

CHAPTER 2

Basic Computer Organization


' i , t:r4 Z I •1

Even though the size, shape, performance, reliability, and cost of computers have been changing over
the last
seven!! years, the basic logical structure (based on the stored program concept), as proposed by Von Neumann,
has not changed. No matter what shape and size of computer we are talking about, all computer systems
perform
the following five basic functions for converting raw input data into useful information and presenting it to
a user:
1. Inputting. It is the process of entering data and instructions into a computer system.
2. Storing. It is the process of saving data and instructions to make them readily available for initial
or
additional processing as and when required. ·
3. Processing.' Performing arithmetic operations (add, subtract, multiply, divide, etc.), or logical operations
(comparisons like equal to, less than, greater than, etc.) on data to convert them into useful information is
known as processing.
4. Outputting. It is the process of producing useful information or results for a user, such as printed report
or visual display.
5. Controlling. Directing the manner and sequence in which the above operations are performed is known
as controlling.

The goal of this chapter is to familiarize you with the units of a computer system that perform these functions.
It
provides an overview of computer systems as computer system architects view them.

Int mal architectu re ·of computers differs from one system model to another. However, basic organizat
ion remains
the\ame for all computer systems. Figure 2.1 shows a block diagram of basic computer organizat
ion. In this
-- -- -- --- - - - - -- --- --- Input Unit 19

fi1g.Ure, solid lines indicate flow of instru t'


. . . . c ion and data,
. and dotted · ·
unit. It displays the five ~aJor bm~dm g blocks (functional Imes represent contro l exercised by contro t
units) of a digita l comp uter system . These five units
corre~po nd to th e five basic operations perfor med by all
descnbed below . computer systems. Functions of each of these units are

Storage unit

Secondary
Progra m and data Input storage
unit Output
Primary unit
rnformation (Resul ts)
storage

I
·1
-+ Indicates flow of
..J instructions and data
Arithmetic
Logic Unit ......... Indicates the control
exercised by the
control unit
Central Processing Unit (CPU)

Figure 2.1. Basic organization of a computer system


.

INPUT UNIT
Data and instructions must enter a computer system befor
e the computer can perform any computation on the
supplied data. The input unit that links a computer with
its external environment performs this task. Data and
instructions enter a computer through an input unit in
a form that depends upon the input device used. For
example, data can be entered using a keyboard in a mann
er similar to typing and this differs from the way in
which data is entered through a scanner, another type of
input device. However, a computer's memory is designed
to accept ~H fl ·n~ code and hence , all input devic
es must transform input signals to binary c~
called i~ erfaceJ accomplish this transformation. Input il_!terfa~ s match
charac~ t cleviees-w-the-reqnirements of a comp the unique physical or electrical
uter system-:-- ~
In short, an input unit performs following functions:

1. It accepts (or..rea.cls}-instruGti0fl·S--ana--dat-a-frem-o utside world


.
2. It converts these instructions and data in computer
accel') table form. Units called input interfaces
acc~~plish this task. - - - - -- -- --- --
3. It su~ str.uctions--a n a ~
r. a g ~storage and furt~e~ rocessing.

OUTPUT UNIT
An output unit performs the reverse operation of that of
an input unit. It supplies information obtained from data
processing to outside world . Hence, it links a computer
with its external environment. As computers work with
binary code, results produced are also in binary fonn. There
fore, before supplying the results to outside world , the
[ ~w:=J ~ hae_ter 2: ~asic Computer Q_~ganiz
ation __
_ __ __ ,

system must convert them to hum an readable) form . Units called output
interfaces ~ccomp
task. Output inte rfaces match the a~ceptable _( 1 or electrical characteristics of output devices (terlis~ this
. ters unique phy sic~ mmals,
pnn , etc.) to the reqm.rements o f an e xter11a l environ ment.

In short, an output unit pe1fom1s fo llow · f ctions·


111g un ·
I. It accepts the produced resuIts, which are in coded form. We cannot understand the
cod ed resu lts easily.
2. It converts these co de d resu lts to human acceptable (readable) form .
. Units called output mterfaces -
accomplish this task.
3_ It supplies the conveited results to out side world.

STORAGE UNIT
Data and instructions entered into a
com put er system through input unit
before actual processi ng ~~ rts. Sim s hav e to be stored_ inside the compute
ilarly, results produced by a com put r
somewhere inside the computer system er _after pro ces smg hav e to be kept
bef ore being passed on to an output
preserve intermediate results for ong urut. Mo reo ver , a com put er must also
oing processing. Storage unit of a com
It provides space for storing data and put er sys tem cate rs to all these need
instructions, intermediate results, and s.
results for output.
In short, a storage unit holds (stores):

1. The data and instructions required for


processing (received from input units).
2. Intermediate results of proces
sing .
3. Final results of processing , before
the system releases them to an out put
unit.
Storage unit of all computers is compris
ed of fol_lo~~n~ -~wo ty_pes of storage
:
1. Primary Sor age . Primary storage of
a computer system, also known as
program instructions and -data, intemre main mgmQry , stores pieces of
oiate results of processing, andrec
job(s) on which the computer system entl y pro duc ed -results of those
is currently working .. The...central pro
pieces of information directly at a very ce§_§ing uni t can acc ess these
fast speed bec aus e they are rep rese
memory chip 's circuitry. However, nted ekc tron ical ly in the main
primary storage is volatile, and it lose
as the computer _system switches off s the info rma tion in it as soon
or resets. Moreover, primary s t ~
capacity because it is very expens normally has lim ited storage
ive. Primary storage · of mo dem com
semiconductor devices. put er sys tem s is mad e up of
2. Secondary storage . Secondary storage
of a com put er system , also known as
-ef the ttrrfitanons of primary stor auxiliary storage, takes care
age. It supplements the limited
characteristic of primary storage. Thi stor age cap acit y and volatile
s is because secondary storage is mu
and it can retain information even whe ch che ape r tha n prim ary storage
n the com put er system swi tche s offo
uses secondary sto~age to store pro r resets. A com put er system
gram instructi?ns, data, and inforn;i
com put er system 1s currently not atio n of tho se job s on which the
working but needs to hol d them
com mo nly used secondary storage med for pro ces sing later. The mdst
ium is magnetic disk.
Arithmetic Logic Unit (ALU) \ . ·:·. 21 _;::.: I
1

ARITHMETIC LOGIC UNIT (ALU


)
A computer performs aU calculation.and
--. b -th - pu t _-; rs co · (d • • . .
Of a JO e com er trans.1e data and mpa nso n ec1s10n -makmg y0perat1ons m. . .
· t
ALU does the processmg and the comput Jns :ruct,1ons stored m its pnmary storage the ALU . Dunng processing
' . · · . . .
. t , .- . •
to ALU as and when needed.
Primary storage unt1 1 needed later Henceerdatempora, 11y tran sfer s the intermediat e results generated there back to
and ALU before processi.ng of the Job ·. , a may move back and forth several •
is ove •
r. times between prim ary storage
The engineering design of a computer's
ALU determin es the lype and n umber of
that a. computer can perform.. Howeve arithrnetrc- and logi~ operations
r, . a_lmost all ALU s are designed to perf
operations (add , subtract, multiply , and orm
and greater than . d1v1de) and logi c operations or compari son the four basic arithmetic
s such as, less than , equal to,

CONTROL UNIT (CU)

How does an input device of a compute


r system know that it is time for it to feed
its ALU know what should be done with data to storage unit? How does
the data once it receives them. Moreover,
sends only the results for output to an how it is that the computer
control unit of the computer system. output device and not the intermediate results? All this is possible due to the

A computer's control unit does not perf


orm any actual processing of jobs, but
for other components of the computer syst acts as the central nervous system
em. It manages and coordinates the ope
It obtains instructions from a program rations of all other components.
stored in main memory, interprets the
causi11g other units of the system to exe instructions, and issues signals
cute them.

CENTRAL PROCESSING UNIT (.

(CPU)
Control unit (CU) and arithmetic logi
c unit (ALU) of a computer system are
Processing Unit (CPU). It is the brain of together known as the Central
a computer system. In a human body, tile·
and other parts of the body function as brain takes all major decisions
directed by the brain. Similarly, in a com
all major calculations and comparison puter system, the CPU performs
s, and also activates and controls the
computer system. operations of other units of the

------------------------------------
THE SYSTEM CO NC EP T

You might have observed that we hav


e been referring to a computer as a
because a system is a group of integrat s~st~m (comput~r s~stem). This is
ed parts having a common purpose of ach1
system has following three characteristics evmg some obJective(s). Hence, a
:
1. It has more than one element. .
2. All its elements are related logicall
y.
3. All its elements are controlled in a
manner to achieve the system goal.
er
. . · . t "t s torage unit ' a nd CPU). '
which work
·f .togeth
.
S mce a comp uter has integr a te d. comp o nents (rnpu t unrt, o utpu unr , Input and outpu t units canno t unctio n until
. · · , y s te m · . .
m , it ,s .i s
to perfor m the s teps ca lled for ,n an execu ting progra ne 1 s of no use. U sefuln ess of each unit
CPU . s·11111-1ar 1y , S tor·-•ge unit or C PU a lo •
theY recei· ve s 1·g na I S from t l.le
, ,
ate a ll unrts to form a sys tem. Hence , we 1efer to a
u

· d · - bl 1 1 ,.,.
... n we integr
dep en d s on ot I1er u111ts a n 1s rea 1,za · c on y w 1

comp uter as a system (comp uter sys te m) .

Poin ts to Ren1ember
o utput res ults of proces s ing. T wo types of storag e are
1. All compu ter syste ms perfor m 1hc _follow ing _f"ivc - primary and seco nd ary storag e. As co mpare d to
basic functio ns for co nvertin eo raw . 1npul data .mto
. primar y storag e. second a ry storag e is s lower in
useful informa lion - inpuui ng. sr-o nng. proces s ing. operat ion, large r in capac ity, cheap er in price, and
o utputti ng, and contro ll ing. ca n retain inform ation eve n when compu ter system
sw itc hes off or resets.
2. Figure 2. l shows rhe main compo ne nts of a co mpute r
system_ 8. During data proces s ing, actua l e xecuti on of
instruc tions takes place in the Arithmetic Logic Unit
3. Input w,ir enable s feedin g of data and instruc tio ns to (ALU) of a compu ter system .
a compu ter system from outsid e wo rld in compu ter
accept able fonn. 9. Control Unit (CU) of a compu ter sys tem manages
and coordi nates the o peratio ns of all other
4. Input interfaces transfo rm input data a nd in structi ons compo nents of the compu ter system .
(fed to a compu ter throug h its input device s) into
binary codes that are accept able to the compu ter. 10. Contro l unit and arithm etic log ic unit of a compu ter
system togeth er form the Centra l Proce ssing Unit
5. Outpu t unit enable s a compu ter sys tem to supply
(CPU) , which serves as the brain of the compu ter
inform ation (obtain ed from data proces sing) to
system and is respon sible for contro lling the
outsid e world in human accept able (reada ble) form.
operat ions of all other units of the system .
6. Outpu t ime,fa ces transfo rm inform ation (obtai ned
11 . We often refer to a compu ter as a compu ter system
from data proces sing) from binary fo,m to human
becau se it consis ts of integr ated compo nents (input
accept able (reada ble) forn1 .
unit, outpu t unit, storag e unit, and CPU) that work
7. Storage unit of a compu ter system holds data and togeth er to perfor m the steps called for in a progra m.
instruc tions to be proces sed and interm ediate and

Que stio ns

1. What are the five basic functi ons perfor med by a 5. Differ entiate betwe en the charac teristi cs of primary
compu ter system ? and secon dary storag e of a compu ter system .

2. Draw a block diagra m to illustr ate basic 6. What are the two m a in compo nents of CPU of a
organi zation of a compu ter system and explai n the compu ter system ? List the ma in functi ons of each
functi ons of variou s units. compo nent.

3. What is an input interfa ce? Ho w it differs from an 7. Write the logica l ~reps taken by a comp uter system
outpu t ~nterf ace? along with the roles of its main units in each step
while transf ormin g input data to useful inform ation
4. How many types of storaf, e a compu ter system for presen tation to a user.
norma lly uses? Justify the need for each storag e
type. 8. What is a system ? Why do we often refer to a
compu ter as a comp uter sys tem?

J
~ -~ - - - --=C~HAPTER 3

Number Systems
I •
CM ; I
flu tr
it+ IN C

We. saw i~ ~e previous chapter


that a computer stores data interna
easily. This 1s the reason why co.m lly in a fonnat that human beings can
puter sys te~ s require · input and out not read
numb~rs, letters , and oth~r specia put (l/O) interfaces. Every computer
l characters m coded form. Before stores
essential to have a basic unders going into the details of these cod
tanding of number system. Hen es. it is
fun d~ ent als of number system ce, this chapter familiarizes you
. It also introduces some com with the
professionals and relationship am monly used number systems by
ong them. computer

NON-POSITIONAL NUMBER
SYSTEMS
Number systems are of two types
- non-positional and positional. In
When counting beyond ten fing early days, human beings counted
ers, they used stones, pebbles, on fingers.
counting uses an additive approa or sticks to indicate values. This
ch or non-positional number system method of
for 1, II for 2, III for 3, IIII for 4, . In this system, we have symbols suc,h
IlII l for 5, etc. Each symbol represe as l
in a number , and to find the val nts the same value regardless of its
ue of a number, one has to count position
Since it is very difficult to per the number of symbols present in
form arithmetic with such a num the num ber .
ber system , positional number sys
developed. tems were
24 Charter J · "lluml,er s, •Lt m

POSITIONAL NUMBER SYSTEMS


-- - • ,ymbul, represent different
t I called J1g11, 11ie:,t: · t
In a posawnol numher J}'Ht-m, there arr uni) B le" ,, ~~~) ';,,e lollow111g ihrec com,idcrnuon~ determine tie
values,depending on the pos1t1on l™-'} (l('C'UP\ in ° nurn
value ol each d1g11 ,n 11uch oi number

The d1g11 lli>Clt ,


2 The po!> 1Uon of tl1e d1g11 '"lhe number. ond f d' . iluble in the number
d - e-d as t.he total number o ig11s ava
J The ba~e of the number )ys1em Ba.1£ , , ell1l I fa single digit is always equal to one
_, H cc the ma.x,mum va ue o
system The ti~I dJ!lll ,s JJWtl}' zero en .
le~) than !11e value of the bJ~-
, m that we usl.! in our day-to-day life. In this system, base _is
A.'> an illust.ralion, /el us consider deomal number d'
f)Sfe (O 5 6 7 8 and 9). You know that m
l em l n symbol5 or ft J<Tlts , 1, 2· 3, 4• ' ' ' '
equal 10 lO because there are a to~ er .~ th ~ f rbe decimal point represent units, tens, hundreds,
decimal number system,. :.uc~s,,'e JX>smons e \~c :er
I
~f the base ( JO). For example, decimal number 2586
thousands. etc. Each pos,uon ~~~ts • spec_
3
. ~ - t ns position 5 in hundreds position, and 2 in thousands
(writt.en as 2586,0) consists of d1g11 6 m uml JX>Siuon. m e ·
position, and its value can be written as:
(2 x 10 3) + (5 x JO!) + (8 x IO') (6 x JO~ = 2000 + 500 + 80 + 6 = 2586
T

Observe that !he same digit signifies different values, depending on the position it occupies in the number. For
example,

In 2586 10 the digit 6 signifies 6 x l0°1 = 6


In 2568 10 the digit 6 signifies 6 x l0 = 60
In 2658 10 the digit 6 signifies 6 x H Y= 600
In 6258 10 the djgi1 6 signifies 6 x Jo-3 = 6000

Hence, we can represent any number by using the available digits and arranging them in various positions.

The principles that apply to decimal number system, also apply to any other positional number system. It is
important to keep track of only the base of the number system in which we are working.

The value of the base in all positional number systems suggests the following characteristics:

1. The value of the base detenrune~ the total number of different symbols or digits available in the number
system. The first of these choices is always zero.
2. The maximum value of a single digit is always equal to one less than the value of the base.

Ve describe below some positional number systems used in computer design and by computer professionals.

:;nary Number System


binary number system, the value of base is 2. Hence, it has only two symbols or dioits (0 and i), the ]aroest
gJe d_igit ~eing 1 (one Jes~ than the ba~~). E~ch ~ositi~n in~ ?inary number represent; a power of the base (2).
ice, m this system, the nghtmost pos1t1on 1s umts (2 ) pos1t1on, the second position from the right is 2's (2')
,
In a positional number system. there are only a few sy mbols called digils. These symbols represent different
values, depending on the position they occupy in a number. The following three consideralions determine the
value of each digit in such a number:

l. The digit itself,


2. The position of the digit in the number, and
3. The base of the number system. Base is defined as the total number of digits available in the number
system. The first digit is always zero. Hence, the maximum value of a single digit is always equal to one
less than the value of the base.

As an ilJustration, let us consider decimal number system that we use in our day-to-day life. In this system, base is
equal to 10 because there are altogether ten symbols or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9). You know that in
~ecimal number system, successive positions to the left of the decimal point represent units, tens, hundreds,
thousands, etc. Each position represents a specific power of the base (10). For example; decimal number 2586
(written as 2586 10) consists of digit 6 in unit position, 8 in tens position, 5 in hundreds position, and 2 in thousands
position, and its value can be written as:

(2 X 103) + (5 X 102) + (8 X 10 1) + (6 X 10~ = 2000 + 500 + 80 + 6 = 2586

Observe that the same digit signifies different values, depending on the position it occupies in the number. For
example,

In 2586 10 the digit 6 signifies -6 x 10° = 6


In 2568 10 the digit 6 signifies 6 x 10 1 = 60
In 2658 10 the digit 6 signifies 6 x 102 = 600
In 6258 10 the digit 6 signifies 6 x 103 = 6000

Hence, we can represent any number by using the available digits and arranging them in various positions.

The principles that apply to decimal number system, also apply to any other positional number system. It is
important to keep track of only the base of the number system in which we are working.

The value of the base in all positional number systems suggests the following characteristics:

1. The value of the base determines the total number of different symbols or digits available in the number
system. The first of these choices is always zero.
2. The maximum value of a single digit is always equal to one less than the value of the base.

We describe below some positional number systems used in computer design and by computer professionals.

Binary Number System


In binary number system, the value of base is 2. Hcn.c~, it_ has ~nly two symbols or digits (0 and 1), the largest
single digit being 1 (one Jess than the ba~~). E~ch ~os1t1~n m ~ ?rnary number represents a power of the base (2/'
Hence, in this system, the rightmost pos1t10n ts units (2 ) pos1t1on, the second position from the right is 2's (2 )
--- - -- ----- Positional Number Systems 2~
-··----- ---- ~ -. - - J - - - ' - - ~

position, and proceeding in thi s way , we have 4's (i2) positi on, S's (2.1) position , l6 's (i4) position , and so on.
Therefore. decimal equivalent of binary number 10101 (w ritlen as 10101 ) is:
2

(l Xi)+ (0 X 2.1) + ( l Xi)+ (0 X 2 1) + (1 X 20) = 16 + Q + 4 + 0 + 1 = 21

In order to be specific about which system we are referring to, it is a common practice to indicate the base as a
subscript. Hence, we write:

1010'2=2 1,o

Bir is the short fom1 of "binary digit". Hence, a "bit" in computer termjnology means ei ther a 0 or 1. An n-bit
number is a binary number consisting of 'n' bits. Figure 3.1 lists all 3-bit numbers along with their decimal
equivalent. Remember that we have only two digits, 0 and 1, in binary number system and hence, binary
equivalent of decimal number 2 has to be stated as 10 (read as one, zero). Another important point to note is that
with 3 bits (positions), only 8 (2.1) different patterns of Os and ls are possible, and it may be seen from Figure 3.1
that a 3-bit number can have one of the 8 values in the range Oto 7. In fact , any decimal number in the range Oto
2" -1 can be represented in binary form as an n-bit number.

Every computer stores numbers, letters, and other special characters Binary Decimal
in binary form. Computer professionals need to know raw data equivalent
contents of a computer' s memory on several occasions. A commonly 000 0
used way of doing trus is to print/display raw memory contents, 001 1
which is called ~mo,y dump . Memory dumps in binary form would 010 2
have many pages of Os and ls. Working with memory dumps in 011 3
binary form would be very difficult and error prone for computer 100 4
101 5
professionals. Hence, computer professionals often use octal and
110 6
hexadecimal number systems, as shortcut notations for binary. They
111 7
are described below.
Figure 3.1. 3-bit numbers with their
decimal values.
Octal Number System
In octal number system, the base is 8. Hence, there are only eight symbols or digits: 0, 1, 2, 3, 4, 5, 6, and 7 (8 and
9 do not exist in this system). The largest single digit is 7 (one less than the base 8). Each position in an octal
number represents a power of the base (8). Therefore, decimal equivalent of octal number 2057 (written as 2057s)
1s:

(2 X 83) + (Q X 82) + (5 X 81) + (7 X 8°) = 1024 + 0 + 40 + 7 = 1071

Hence, 2057 8 = 1071 10

Observe that since there are only 8 digits in octal number system, 3 bits (2 3 = 8) are sufficient to represent any
octal number in binary (see Figure 3.1).

Hexadecimal Number System


In hexadecimal number system, the base is 16. Hence, there' are 16 symbols or digits. The first 10 digits are the
same digits of dec imal number system - 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The remaining six digits are the symbols A,
B, C, D, E, and F, representing decimal values 10, 11 , 12, 13, 14, and 15, respectively. Hence, the largest single
[ }6 j Ch.apter 3: Number Systems
7

digit is For 15 (one less than the base 16). Each position in hexadecimal number system represents a power of the
base (16). Therefore, decimal equ ivalent of hexadecimal number I AP (written as lAP16) is:

(l x 16 2) +(A x 16 1) + (F x 16°) = (1 x 256) + (10 x 16) + (15 x I) = 256.+ 160 + 15 = 431

He nce, I AF 16 = 4 31 10
4
Observe that since there are only 16 digits m hexadecimal number system, 4 bits (2 = 16) are s ufficient to
represent any hexadecimal number in binary.

CONVERTING FROM ONE NUMBER SYSTEM TO ANOTHER


Input data fed t~ computers and final output values are to be in decimal because decimal numbers are much more
meaningful to us than are numbers expressed in any other number system. Hence, computer professionals are
often required to convert numbers in other number systems to decimal and vice-versa. They use various methods
to convert numbers from one base to another. A method ·of converting from another base to decimal, and a method
of converting from decimal to another base are described below.

Converting from Another Base to Decimal


We use the following steps to convert a number in any other base to a base 10 (decimal) number:

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 up the products calculated in Step 2. The total is the equivalent value in decimal.

Example 3.1.
.- .
l1001i=?10

Solution: Solution:
Step 1: Determine column values Step 1: Determine column values
Column Number Column Value Column Number Column Value
(from right) (from right)

1 2°= l l 8°= l
2 2 1 =2 2 8 1= 8
3 2 2 =4 3
2
8 = 64
4 23 = 8 4 3
8 = 512
5 2 4 = 16

(Continued 011 next page . .. ) (Co11ti1111ed 011 next page... )


Converting from One Nu~ber System to!noth~ [ 27 ]

Step 2: Multiply column values by the Step 2: Multiply column values by the
corresponding column di gits corres ponding co lumn digits

16 8 4 2 51 2 64 8
xl xl x0 x0 xl x4 x7 x0 x6
16 8 0 0 2048 448 0 6

Step 3: Sum up the products


Step 3: Sum up the products
16 + 8 + 0 + 0 + 1 = 25
2048 + 448 + 0 + 6 = 2502
Hence, 11001 2 = 25 ,0
Hence, 4706s = 25021 0

-\,.·. . . . , .. ,. ........
Example 3.3. Exiiiiipl~ 3:4. · ... ·, ': ,. ·, ,..
lAC16 = ?_10 . :.. ~- Ao;2;.=·?~~ ._..
...... , 1 • , ·- ~~--. • :- •. • •
. - . 4
..
Solution: Solution:
2 1 40527= 4 X73 + 0 X ?2 + 5 X7' + 2 X7°
lAC 16 = I X 16 +AX 16 + C X 16°
= l x 256 + 10 x 16 + 12 x 1 = 4 x 343 + 0 x 49 + 5 x 7 + 2 x I
= 256 + 160 + 12 = 1372 + 0 + 35 + 2
= 42810 = 140910

Example 3.5. Comparing the result of Example 3.5 with the


40526 = ?10 result of Example 3.4, we find that although the
digits (4052) are same for both the numbers,
Solution: their decimal equivalents are different. This is
2 1 because the number in Example 3.4 is in base 7
40526 = 4 X63 + Q X6 + 5 X6 + 2 X 6°
number system, whereas the number in Example
= 4 X216 + 0 X36 + 5 X 6 + 2 X 1
3.5 is in base 6 number system
= 864 + 0 + 30 + 2
= 89610

Example 3.6. Exampl! 3.7.


110014 = ?10 .:· .· lAC13·=?10 ,:

Solution: Solution:
4 3 2 1
1100}4 = I X 4 + 1 X4 + 0 X 4 + lAC13 = 1 X 13 2 +AX 13 + C X13°
0x4 1 + 1 x4° =Ix 169 + IO x 13 + 12 x 1
= 1 x 256+ 1 x64 + 0 x 16+ = 311 10
0x4+lxl
= 256 + 64 + 0 + 0 + I Compare the result with the result
= 321 10 obtained in Example 3.3.

Compare the result with the result obtained


in Example 3.1.
28 ] Chapter 3: Nwnber Systems

Converting from Decimal to Another Base (Division-Remainder


Technique)
We use the following steps to convert a base 10 (decimal) number to a number in another base:

Step 1: Divide the decimal number by the value of the new base.

Step 2 : Record the remainder from Step 1 as the rightmost digit (least significant digit) of the new base
number.

Step 3: Divide the quotient of the previous division 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 , recording remainders from right to left, until the quotient becomes zero in Step 3. Note that
the last remainder, thus obtained, will be the most significant digit of the new base number.

Example 3.8.
2510 = ?2
Solution:
Steps 1 and 2: 25/2 = 12 and remainder 1
Steps 3 and 4: 12/2 = 6 and remainder 0
Steps 3 and 4: 6/2 = 3 and remainder 0
Steps 3 and 4: 3/2 = 1 and remainder 1
Steps 3 and 4: 1/2 = 0 and remainder 1

As mentioned in Steps 2 and 4, we now arrange the remainders in reverse


order, making the first remainder the least significant digit (LSD) and the last
remainder the most significant digit (MSD).
Hence, 2510 = 11001 2
Compare the result with the result obtained in Example 3.1.
Converting from One Number System to Another I 29

'Example 3.9. E:cample 3.10.


4210::. ?~ 95210= ?s
Sol11tio11:
So/11tio11:

2 42 Remainders 8 952 Remainders

21 0 119 0
10 14 7
5 0 6
2 0

0 Hence, 95210 = 1670s


0

Hence, 4210 = 1010102

Example 3.11. Example 3.11.


42810 = ?16 10010= ?5
Sol11tion: So/11tio11:
Remainders in
16 428 hexadecimal 5 100 Remainders

26 12 = C 20 0
10= A
4 0
0 I=1
0 4
Hence, 42810 = IAC16
Compare the result with the result Hence, 10010 = 400s
obtained in Example 3.3.
L _30 J C hapte r 3 : Numb er Sys1c1ns
,
Exam ple 3.13. Hxample J. /4.

100,o = ?4 I 7 15 w • 'l 12

S olutio n: So/11.tloll:
Rcma indcn, in
4 100 Re ma inders J2 17 15 ln.1sc 12

__
,_ 25 o 142 JI = 8

6 lI IO= A
2 0 ll =B
0
He nce, 171 5,o = BAB ,2
He nce, 100 10 = J 2 104
Compare the result with the
result o bta ined in Exam ple
3. 12.

Ba se Oth er T han 1o
Con ver ting f rom a Bas e Oth er Tha n 1O to Ano ther
othe r than JO, to a numb er in a nothe r base o ther than 10:
W e use the follo wing steps to conve rt a number in a base

Step 1: Conv ert the origin al numb er to a base IO (decimal) numb er.
base number.
Step 2 : Conv ert the decim al number obta ined in Step 1 to the new

Example 3.15. Example 3.16.


5456 = ?, 1011 102= ?11

Solution: Soluti on:

Step 1: Convert fro m base 6 to base 10 Ste p 1: Conv ert JO 11102 to base I 0
4
1
545 = 5 X 6 2 + 4 X 6 + 5 X 60 10 l 1102 = I X25 + 0 X 2 + 1 X 2 ~ +
2 1
X 2 + 1 X 2 + 0 X 2°
= 5 X 36 + 4 X 6 + 5 X J ]

= 180 + 24 + 5 = 32 + 0 + 8 + 4 + 2 + 0
= 209 w = 4610

(Co11ti nued on 11ext page ... ) (Conti nued on n ext page ... )
----- --

Step 2: Convert 209 10 to base 4 Step 2: Convert 46 10 to base 8

4 209 Remainders 8 46 Remainders


52 5 6
13 0 0 5
3
0 3 46,o = 56s
Therefore, 1011102= 4610= 56s
20910 = 31014
Hence, 1011102= 56s
Therefore, 545 6 = 209IO= 3101 4
Hence, 545 6 = 31014

Example 3.16 illustrates the method of converting a binary number to an octal number. Similarly, Example 3.17
shows how to convert a binary number to a hexadecimal number. However, these are lengthy procedures and we
can use shortcut methods when we desire such conversions. These shortcut methods are described below.

&ample 3.17.
110HXllh =116

Solution:
Step l : Convert 11010011 2 to base 10

110l00112 = l X 27 + 1 X 26 + 0 X i5 + l X i4 + 0 X i3 + 0 X i2 :I- l X 21 + l X 2°
= l x 128 + l x 64 + 0 x 32 + l x 16 + 0 x 8 + 0 x 4 + 1 x? + l x l
= 128 + 64 + 0 + 16 + 0 + 0 + 2 + 1
= 211 IO

Step 2: Convert 211 10 to base 16

16 211 Remainders

13 3 = 3 in Hexadecimal

0 13 = D in Hexadecimal

Therefore, 110100112=21110= D316

Hence, 110100112= D3 16

You might also like