Fundamentals of Computers
Fundamentals of Computers
INTRODUCTION.....................................................................................................................................3
CHARACTERISTICS OF COMPUTERS...................................................................................................3
THE EVOLUTION OF COMPUTERS......................................................................................................4
The mark 1 computer....................................................................................................................5
The Atanasoff-berry computer......................................................................................................5
The ENIAC......................................................................................................................................5
The EDVAC.....................................................................................................................................6
The EDSAC.....................................................................................................................................6
Manchester mark 1........................................................................................................................6
The UNIVAC 1................................................................................................................................6
THE COMPUTER GENERATIONS.........................................................................................................6
First generation.............................................................................................................................7
Second generation.........................................................................................................................7
Third generation............................................................................................................................8
Fourth generation..........................................................................................................................8
Fifth generation.............................................................................................................................9
BASIC COMPUTER ORGANIZATION......................................................................................................10
INPUT UNIT......................................................................................................................................10
OUTPUT UNIT..................................................................................................................................10
STORAGE UNIT.............................................................................................................................11
ARITHEMETIC LOGIC UNIT...............................................................................................................11
CONTROL UNIT................................................................................................................................11
CENTRAL PROCESSING UNIT............................................................................................................12
THE SYSTEM CONCEPT.....................................................................................................................12
NUMBER SYSTEM................................................................................................................................12
NON-POSITIONAL NUMBER SYSTEMS.............................................................................................13
POSITIONAL NUMBER SYSTEMS......................................................................................................13
Binary number system.................................................................................................................14
Octal number system...................................................................................................................15
Hexadecimal number system......................................................................................................15
CONVERTING FROM ONE NUMBER SYSTEM TO ANOTHER.............................................................15
Converting To Decimal From Another Base.................................................................................16
Converting From Base 10 To A New Base....................................................................................18
Converting From A Base Other Than 10 To A Base Other Than 10..............................................20
Shortcut Method For Binary To Octal Conversion.......................................................................21
Shortcut Method For Octal To Binary Conversion.......................................................................22
Shortcut Method For Binary To Hexadecimal Conversion...........................................................22
Shortcut Method For Hexadecimal To Binary Conversion...........................................................23
FRACTIONAL NUMBERS...................................................................................................................24
INTRODUCTION
The word computer comes from the word compute which means to calculate so a computer is
normally considered to be a calculating device that can perform arithmetic operations at enormous
speed.
In fact, the original objective for inventing the computer was to create a fast-calculating machine.
But more than 80% of the work done by computers today is of non -mathematical or non-numerical
nature. Hence to define a computer merely as calculating device is to ignore over 80% of its work.
More accurately a computer may be defined as a device that operates upon information or data.
Data can be anything like bio data of various applicants when the computer is used for recruiting
personal, or the marks obtained by various students in various subjects when the compute is used to
prepare results or the details of carious passengers when the computer is employed for making
airline or railway reservations or numbers of different typos in case of application of computers for
scientific research problems etc.
Thus, data comes in various shapes and sizes depending upon the type of computer application a
computer can store process and retrieve data as and when desire. The fact that computers process
data is so fundamentals that many people have started calling it a data processor.
The name data processor is more inclusive because modern computers not only compute in the
usual sense but also perform other functions with the s data that flow to and from them for example
data processors may gather data from various incoming sources merge process of mixing or putting
together them all sort process of arranging in some sequence ascending or descending them in the
desired order and finally print them in the desired format. None of these operations involve the
arithmetic operations normally associated with a computing device but the term computer is often
applied anyway.
CHARACTERISTICS OF COMPUTERS
Speed a computer is a very fast device it can perform in a few seconds the amount of work that a
human being can do in an entire year if he worked day and night and did nothing else. To put it in a
different manner a computer does in one minute what would take a man his entire lifetime.
While talking about the speed of an computer we do not talk in terms of seconds or even
milliseconds. Out units of speed are the microseconds the nanoseconds and even the picoseconds. A
powerful computer is capable of performing about 3 to 4 million simple arithmetic operations per
second.
Accuracy- the accuracy of a computer is consistently high and the degree of accuracy of a particular
computer depends upon its design. But for a particular computer each and every calculation is
performed with the same accuracy.
Errors can occur in a computer but these are mainly due to human rather than technological
weaknesses that is due imprecise thinking by the programmer a person who writes instructions for a
computer to solves a particular problem or due to inaccurate data.
Diligence- unlike human beings a computer is free from monotony, tiredness, lack of concentrations
etc., and hence can work for hours together without creating any error and a without grumbling.
Due to this property, computers obviously score over human beings in doing routine type of hobs
which require great accuracy. If ten million calculations have to be performed, a computer will
perform the tenth million calculation with exactly the same accuracy and speed as the first one.
Versatility- versatility is one of the most wonderful thing about the computer. One moment, it is
preparing the results of particular examination the next moment it is busy preparing electricity bills
and in between it may be helping an office secretary to trace an important letter in seconds. All that
is required to change its talent is to slip in a new program (a sequence of instructions for the
computer) into it. Briefly, a computer is capable of performing almost any task provided that the
task can be reduced to a series of logical steps.
Power of remembering- as a human being acquires new knowledge the brain subconsciously selects
what it feels to be important and worth retaining in its memory, and relegates unimportant details
to the back of the mind or just forgets them. With computers, this is not the case. A computer can
store and recall any amount of information because of its secondary storage (a type of detachable
memory) capability. Every piece of information can be retained as long as desired by the users and
can be recalled as and when required. Even after several years, the information recalled will be as
accurate as on the day when it was fed to the computer. A computer forgets or losses certain
information only when it is asked to do so. So, it is entirely upto the user to make a computer
reaction or forget a particular information.
No iq- a computer is not a magical device. It can only perform tasks that a human being can. The
difference is that it can performs these tasks with unthinkable speed and accuracy it possesses no
intelligence of its own, its iq is zero at least till today. It has to be told what to and in what sequence.
Hence, only the user can determine what tasks a computer will perform. A computer cannot take its
own decision int this regard.
No feelings- computers are devoid of emotions. They have no feelings and no instincts because they
are machine. Although men have succeeded in buildings memory for the computer but no computer
possesses the equivalent of a human heart and soul. Based on our feelings, taste, knowledge, and
experience, we often make certain judgements in our day-to-day life. But computers cannot make
judgements pn their own. Their judgements is based on the instructions given to them in the form of
programs that are written by us. They are only good as man makes and uses them.
The earliest device that qualifies as a digital computer is the ‘’abacus’’ also known as ‘’soroban’’. This
device permits the user to represents numbers by the position of beads on a rack. Simple addition
and subtraction can be carried out rapidly and efficiently by positioning the beads appropriately.
Although the abacus was invented around 600BC its interesting to note that it is still used in the far
east and its users can calculating at amazing speeds.
Another manual calculating device was john napier s bone or card board multiplication calculator. It
was designed in the 17th century and its upgraded versions were in use even around 1890.
The first mechanical adding machine was invented by Blaise pascal in 1642. Later, in the year 1671,
baron Gottfried Wilhelm von Leibniz of Germany invented the first calculators for multiplication.
Keyboard machines originated in the United States around 1880 and area extensively used even
today. Around this period only, Herman Hollerith came up with the concept of punched cards which
are extensively used as input media in modern digital computers. Business machines and calculator’s
made their appearance in the Europe and America towards the end of nineteenth century.
Although this machine proved to be extremely reliable it was very complex in design and huge in
size. It used over 3000 electrically actuated switches to control its operations and was approximately
50 feet long and 8 feet high. It was capable of performing five basic operations: addition,
subtraction, multiplication, division and table reference. A number as big as 23 decimal digits could
be used in this machine. It took approximately 0.3 seconds to add two numbers and 4.5 seconds to
multiply two numbers. Hence the machine was very slow as compared to todays computers.
It was basically an electro-mechanical device since both mechanical and electronic components were
used in its design. Although its operation were not controlled electronically Aikens machine is often
classified as computers because its instructions, which were entered by means of punched paper
type, could be altered.
The ENIAC
The electronic numerical integrator and calculator was the first all-electronic computer. It was
constructed at the more school of engineering of the university of Pennsylvania USA by a design
team led by a professor known as Presper Eckert.
ENIAC was developed as a result of military need. it took up the wall space in a 20x40 square feet
room and used 18000 vacuum tubes the addition of two numbers was achieved in 200ms and
multiplication in 2000ms.
Although much faster in speed as compared to mark 1 computer, ENIAC had two major
shortcomings: it could store and manipulate only a limited amount of information, and its programs
were wired on board there limitations made it difficult to detect errors and to change the
programme. Hence its use was limited. However, whatever be the shortcomings of ENIAC, it
represented impressive feat of electronic engineering and was used to many years to solves ballistic
problems.
The EDVAC
The operation of ENIAC was seriously handicapped by the new wiring board. This problem was later
overcome by the new concept of ‘stored program’ developed by Dr John Von Neumann. The basic
idea behind the stored program concept is that a sequence of instructions as well as data can be
stored in the memory of the computer for the purpose of automatically directing the flow of
operations. The stored program feature considerably influenced the development of modern digital
computers and because of this feature we often refer to modern digital computers as stored
program digital computers. The electronic discrete variable automatic computer was designed on
stored program concept. Von Neumann has also got a share of the credit for introducing the idea of
storing both instructions and data in the binary form (a system that uses only two digits 0 and 1 to
represent all numbers and characters) instead of the decimal numbers or human readable words.
The EDSAC
Almost simultaneously with EDVAC the Britishers developed electronic delay storage automatic
calculator EDSAC. The machine executed its first program in may 1949. In this machine, addition
operation was accomplished in 1500ms, and multiplication operation in 4000ms. The machine was
developed by a group of scientist headed by Professor Maurice Wilekes at the Cambridge University.
Manchester mark 1
The computer was a small experimental machine based on the stored program concept. It was
designed at Manchester University by a group of scientists headed by professor MHA Newman. Its
storage capacity was only 32 words, each of 31 binary digits. This was too limited to store data and
instructions. Hence the Manchester Mark 1 was hardly of any practical use.
The UNIVAC 1
The Universal Automatic Computer UNIVAC was the first digital computer which was not ‘one of the
kind’. Many UNIVAC machines were produced, the first of which was installed in the Census Bureau
in 1951 and was used continuously for 10 years. The first business use of a computer was UNIVAC 1
was by General Electric Corporation inn 1954.
In 1952, the International Business Machines IBM Corporation introduces the 701 commercial
computers. In rapid succession, improved models of the UNIVAC 1 and other 700-series machines
were introduced. In 1953, IBM produced the IBM-650 and sold over 1000 of these computers.
The commercially available digital computers, that could be used for business and scientific
applications, had arrived.
The customs of referring to the computer era in terms of generations came into wide use only after
1964. Ther are total five computer generations known till today. Each generations has been
discussed below in detail along with certain amount of overlapping between the generations, the
approximate dates shown against each are normally accepted.
First generation
We have already discussed about some of the early computers- ENIAC EDVAC EDSAC etc. these
machines and other of their time were made possible by the invention of “vacuum tube”, which was
a fragile glass device that could control and amplify electronic signals. These vacuum tube computers
are referred as first-generation computers.
ADVANTAGES
Vacuum tubes were the only electronic components available during those days.
Vacuum tube technology made possible the advent of electronic digital computers.
These computers were the fastest calculating device of their time. They could perform computations
in milliseconds.
DISADVANTAGES
Too bulky in size
Unreliable
Thousand of vacuum tubes that were used emitted large amount of heat and burnt out frequently
Nonportable
Second generation
The transistors, a smaller and more reliable successor to the vacuum tube was invented in 1947.
However, computers that used transistors were not produced in quantity until over a decade later.
The second-generation computer emerged with the transistors being the brain of the computer
With both the first and the second-generation computers, the basic component was a discrete or
separate entity. The many thousands of individual components had to be assembled by hand into
functioning circuit. The manual assembly of individual components and the cost of labour involved at
his assembly stage made the commercial production of these computers difficult and costly.
ADVANTAGES
Smaller in size as compared to first generation computers
More reliable
These computers were able to reduce computational times from milliseconds to microseconds.
Less prone to hardware failures
Better portability
DISADVANTAGES
Air conditioning required
Third generation
Advances in electronics technology continued and the advent of microelectronics technology made
it possible to integrate a large number of circuit elements into very small (less than 5mm square)
surface of silicon known as “chips”. This new technology was called “integrated chips” (IC). The third
generation was based on IC technology and the computers that were designed with the use of
integrated circuits were called the third-generation computers.
ADVANTAGES
Smaller in size as compared to the previous generation computers.
Easily portable
Widely used for various commercial applications all over the world
Manual assembly of individual components into a functioning unit not required. So human labour
and cost involved are assembly stage reduces drastically.
DISADVANTAGES
Air conditioning required
Fourth generation
Initially, the integrated circuits contained only about ten to twenty components. This technology was
named small scale integration (SSI). Later, with the advancement in technology for manufacturing
ICs, it became possible to integrate upto a hundred components on a single chip. This technology
was named as medium scale integration (MSI). Then came the era of large-scale integration (LSI)
when it was possible to integrate over 30000 components onto a single chip. Effort is still on for
further miniaturization and it is expected that more than one million components will be integrated
on a single chip known as very large-scale integration (VLSI).
A Fourth-generation computer which is what we have now has LSI chips as its brain. It is LSI
technology which has led to the development of very small but extremely powerful computers. It
was start of a social revolution. A whole computer circuit was soon available on a single chip, the size
of a postage stamp. Overnight computers became incredibly compact. They became inexpensive to
make and suddenly it became possible for anyone and everyone to own a computer.
ADVANTAGES
Smallest in size because of high component density
Very reliable
DISADVANTAGES
Highly sophisticated technology required for the manufacture of LSI chips.
Fifth generation
Scientist are now are work on the fifth-generation computers- a promise, but not year reality. They
aim to bring us machines with genuine IQ the ability to reason logically, and with real knowledge of
the world. Thus, unlike the last four generations which naturally followed its predecessor, the fifth
generation will be totally different.
In structure it will be parallel (the present ones are serial) and will be able to do multiple tasks
simultaneously.in functions, it will not be algorithmic (step by step, with one step at a time). In
nature, it will not do just data processing (number crunching) but knowledge processing. in
inference, it will not be merely deductive, but also inductive. In application, it will behave like an
expert. In programming, it will interact with humans in ordinary language (unlike BASIC, COBOL,
FORTRAN which present computer needs). And in architecture, it will have KIPS (knowledge
information processing system) rather than the present DIPS/LIPS (data/logic information processing
system)
The odds of coming out with a fifth-generation computers are heaviest for Japan. They have already
started work in this direction few years back. Japan has chosen PROLOG (programming in logic)
language as its operating software and plans to have the final machine talk with human beings, see
and deliver pictures and hear the normal, natural language.
BASIC COMPUTER ORGANIZATION
All computer system perform the following five operations:
Inputting the process of entering data and instructions into the computer system.
Storing saving data and instructions so that they are available for initial or for additional processing
as and when required.
Processing performing arithmetic operations or logical operations (comparisons like equal to, less
than, greater than etc.) on data in order to convert them into useful information.
Outputting the process of producing useful information or results for the user, such as a printed
report or visual display.
Controlling directing the manner and sequence in which all of the above operations are performed.
The goal of this chapter is to familiarize you with the computer system units that perform these
functions. This chapter will provide you with an overview of computer systems as they are viewed by
computer system architects.
The internal architectural design of computers differs from one system model to another. However,
the basic organization remains the same for all computer systems. A block diagram of the basic
organization is given in figure 2.1. in this figure, the solid lines are used to indicate the flow of
instructions and data, and dotted lines represent the control exercised by the control unit. It displays
the five major building blocks, or functional units, of a digital computer system. These five units
correspond to the five basic operations performed by all computer systems. The functions of each of
these units is described below:
INPUT UNIT
Data and instructions must enter the computer system before any computation can be perform on
the supplied data. This task is performed by the input unit that links the external environment with
the computer system. Data and instructions enter input units in forms that depends upon the
particular device used. For example, data is entered from a keyboard in a manner similar to typing
and this differs from the way in which data is entered through a card reader which is another type of
input device. However, regardless of the form in which they receive their inputs, all input devices
must provide a computer with data that are transformed into the binary codes that the primary
memory of a computer is designed to accept. This transformation is accomplished by units called
input interfaces. Input interfaces are designed to match the unique physical or electrical
characteristics of input devices to the requirements of the computer system.
It accepts the lists of instructions and data from the outside world.
It supplies the converted instructions and data to the computer system for further processing.
OUTPUT UNIT
The job of an output unit is just the reverse of that of an input unit. It supplies information and
results of computation to the outside world. Thus, it links the computer with external environment.
As computers work the external environment. As computers work with binary code, the results
produced are also in the binary form. Hence, before supplying the results to the outside world, it
must be converted to human acceptable form. This task is accomplished by units called output
interfaces. Output interfaces are designed to match the unique devices to the requirements of the
external environment.
It accepts the results produced by the computer which are in coded form and hence cannot be easily
understood by us.
STORAGE UNIT
The data and instructions that are entered into the computer system through input have to be
stored inside the computer before the actual processing starts. Similarly, the results produced by the
computer after processing must also be kept somewhere inside the computer system before being
passed on to the output units. Moreover, the intermediate results produced by the computer must
also be preserved for engine processing. The storage unit or the primary/main storage of a computer
system is designed to cater to all these needs. It provides space for storing data and instructions,
space for intermediate results and also space for the final results.
In short, the specific functions of the storage unit are to hold (store):
All the data to be processed and the instructions required for processing (received from the input
devices).
Final results of processing before these results are released to an output device.
The type and number of arithmetic and logic operations that a computer can perform is determined
by the engineering design of the ALU. However, almost all ALUs are designed to perform the four
basic arithmetic operation – add, subtract, multiply, divide and logic operations or comparisons such
as less than, equal to or greater than.
CONTROL UNIT
How does the input device know that it is time for it to feed data into the storage unit? How does
the ALU know what should be done with the data once they are received?
And how is it that only the final results are sent to the output device and not the intermediate
results? All this is possible because of the control unit of the computer system. By selecting,
interpreting, and seeing to the execution of the program instructions, the control unit is able to
maintain order and direct the operation of the entire system. Although, it does not perform any
actual processing on the data, the control unit acts as a central nervous system for the other
components of the computer. It manages and coordinates the entire computer system. It obtains
instructions from the program stored in main memory, interprets the instructions, and issues signals
that cause ither units of the system to execute them.
A system is a group of integrated parts that have the common purpose of achieving some objective.
So, the following three characteristics are key to a system:
All the elements of a system are controlled in such a way that the system goal is achieved.
Since a computer is made up of integrated components (input and output devices, storage, CPU)
that work together to perform the steps called for in the program being executed, it is a system. The
input or output units cannot function until they receive signals from the CPU. Similarly, the storage
unit or the CPU alone is of no use. So, the usefulness of each unit depends on other units and can be
realized only when all units are put together (integrated) to form a system.
NUMBER SYSTEM
We have already seen in the previous chapter that inside a computer system, data is stored in a
format that cannot be easily read by human beings. This is the reason why input and output
interfaces are required. Every computer stores numbers, letters, and other special characters in a
coded form. Before going into the details of these codes, it is essential to have a basic understanding
of the number system. So, the goal of this chapter is to familiarize you with the basic fundamentals
of number system. It also introduces some of these commonly used number systems by computer
professionals and the relationship between them.
The base of the number system (where base is defined as the total number of digits available in the
number system).
The number system that we use in our day-to-day life is called the decimal number system. In this
system, the base is equal to 10 because there are altogether ten symbols or digits (1234567890)
used in this system. You know that in the decimal system, the successive positions to the left of the
decimal point represent units, tens, hundreds, thousands, etc. but you may not have given much
attention to the fact that each position represents a specific power of the base 10. For example, the
decimal number 2586 consists of the digit 6 in units, 8 in tens, 5 in hundreds and 2 in the thousands
position and its value can be written as:
2000+500+80+6 or 2586
It may be also observed that the same digit signifies different values depending on the position it
occupies in the number. For example,
Thus, any number can be represented by using the available digits and arranging them in various
positions.
The principles that apply to the decimal system apply in any other positional number system. It is
important only to track of the base of the number system in which we are working.
There are two characteristics of all number systems that are suggested by the value of the base. In
all number systems, the value of the base determines the total number system. The first of these
choices is always zero. The second characteristics is that the maximum value of a single digit is
always equal to one less than the value of the base.
Some of the number systems commonly used in computer design and by computer professional are
discussed below.
Or 16 + 0 + 4 + 0 + 1
Or 21
In order to be specific about which system we are referring to it is common practice to indicate the
base as the subscript. Thus, we write: 10101 2 = 2110
“Binary digit” is often referred to by the common abbreviation bit. Thus a “bit” in computer
technology means either 0 or 1. A binary number consisting of n bits is called an n-bit number. Table
3.1 lists all the 3-bit numbers along with their decimal equivalent. Remember that we have only two
digits 0 and 1, in the binary system, hence the binary equivalent of the decimal number 2 has to
stated as 10 (read as one zero). Another important point to note that is 3-bit positions only 8
different pattern of 0s 1s are possible. In fact, it can be shown that any decimal number in the range
of 0 to 2^n-1 can be represented in the binary form as an n-bit number.
Every computer stores numbers, letters, and other special characters in the binary form. There are
several occasions when computer professionals have to know the raw data contained in a
computer’s memory. A common way of looking at the contents of a computer’s memory is to print
out the memory contents on the line printer, this print out is called a memory dump. If memory
dumps were to be printed using binary numbers, the computer professionals would be confronted
with many pages of 0s and 1s. Working with these numbers would be very difficult and error prone.
Because of the quantity of printout that would be required in a memory dump of binary digits and
the lack of digit variety, two number systems, octal and hexadecimal, are used as shortcut notation
for binary. These number systems and their relationship with the binary number system will now be
explained in this chapter.
Or 1024 + 0 + 40 + 7
Or 1071
Observe that since there are only 8 digits in the octal number system, so 3 bits are sufficient to
represent any octal number in binary.
Or 256 + 160 + 15
Or 431
Observe that since there are only 16 digits in the hexadecimal number system, so 4 bits are sufficient
to represent any hexadecimal number in binary.
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 by the digits in the corresponding columns.
Step 3: sum the products calculated in step 2. The total is the equivalent value in decimal.
Solution:
16 8 4 2 1
X1 X1 X0 X0 X1
16 8 0 0 1
16 + 8 + 0 + 0 + 1 = 25
Solution:
Step 1:
Step 2:
512 64 8 1
X4 X7 X0 X6
2048 448 0 6
Step 3:
Solution:
= 1 x 256 + 10 x 16 + 12 x 1
= 256 + 160 + 12
= 42810
Solution:
40527 = 4 x 73 + 0 x 72 + 5 x 71 + 2 x 70
= 4 x 373 + 0 x 49 + 5 x 7 + 2 x 1
= 1372 + 160 + 12
= 140910
Solution:
40527 = 4 x 63 + 0 x 62 + 5 x 61 + 2 x 60
= 4 x 216 + 0 x 36 + 5 x 6 + 2 x 1
= 864 + 0 + 30 + 2
= 89610
Comparing this results with the result obtained in example 3.4, we find that although the digits
(4052) are same for both the numbers, but their decimal equivalent is different. This is because of
the fact that the number in example 3.4 is represented in base 7 number system whereas the
number in example 3.5 is represented in base 6 system.
Solution:
40527 = 1 x 44 + 1 x 43 + 0 x 42 + 0 x 41 + 1 x 40
= 1 x 256 + 1 x 64 + 0 x 16 + 0 x 4+ 1 x 1
= 256 + 64 + 0 + 0 + 1
= 32110
Solution:
= 1 x 169 + 10 x 13 + 12 x 1
= 31110
Step 1: divide the decimal number to be converted 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 divide by the new base.
Step 4: record the remainder from step 3 as the next digit 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 (MSD) of the new
base number.
Solution:
As mentioned in steps 2 & 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).
2 42 Remainders
21 0
10 1
5 0
2 1
1 0
0 1
Hence, 4210 = 1010102
Solution:
8 952 Remainders
119 0
14 7
1 6
0 1
Hence, 95210 = 16708
Solution:
Solution:
5 100 Remainders
20 0
4 0
0 4
Hence, 10010 = 4005
4 100 Remainders
25 0
6 1
1 2
0 1
Hence, 10010 = 12104
Solution:
12 1715 Remainders in base 12
142 11 = B
11 10 = A
0 11 = B
Hence, 171510 = BAB12
545 = 5 x 62 + 4 x 61 + 5 x 60
= 5 x 36 + 4 x 6 + 5 x 1
= 180 + 24 + 5
= 20910
4 209 Remainders
52 1
13 0
3 1
0 3
Hence, 20910 = 31014
Solution:
1011102 = 1 x 25 + 0 x 24 + 1 x 23 + 1 x 22 + 1 x 21 + 0 x 20
= 32 + 0 + 8 + 4 + 2 + 0
= 4610
8 46 Remainders
5 6
0 5
Hence, 4610 = 568
Solution:
110100112 = 1 x 27 + 1 x 26 + 0 x 25 + 1 x 24 + 0 x 23 + 0 x 22 + 1 x 21 + 1 x 20
= 128 + 64 + 0 + 16 + 0 + 0 + 2 + 1
= 21110
16 211 Remainders
13 3
0 13 = D
Hence, 21110 = D316
Example 3.16 illustrates the method of converting a number from binary to octal. Similarly, example
3.17 shows how to convert a number from binary to hexadecimal. However, these are lengthy
procedures and shortcut methods can be used when we desire such conversions. We will now
discuss these shortcut methods.
Step 1: divide the binary digits into groups of three (from right)
Step 2: convert each group of three binary digits into one octal digit. Since decimal digits 0
to 7 are equal to octal digits 0 to 7 so binary to decimal conversion can be used in
this step.
Step 1: divide the binary digits into groups of 3 starting from the right.
101 110
1012 = 1 x 22 + 0 x 21 + 1 x 20
=4+0+1
=5
1102 = 1 x 22 + 1 x 21 + 0 x 20
=4+2+0
=6
Hence, 1011102 = 568
Solution:
0012 1
1012 5
0102 2
11010102 = 1528
Step 2: combine all the resulting binary groups into a single binary number
Solution:
58 = 1012
68 = 1102
28 = 0102
Solution:
68 = 1102
78 = 1112
58 = 1012
18 = 0012
Step 1: divide the binary digits into groups of four (starting from right)
Step 2: convert each group of four binary digits to one hexadecimal digit. Remember that
hexadecimal digits 0 to 9 are equal to decimal digits 0 to 9, and hexadecimal digits A
to F are equal to decimal digits 10 to 15. Hence for this step, the binary to decimal
conversion procedure can be used, but the decimal values to 10 to 15 must be
represented by A to F.
Solution:
1101 0011
11012 = 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20
=8+4+0+1
= 1316
= D16
00112 = 0 x 23 + 0 x 22 + 1 x 21 + 1 x 20
=0+0+2+1
= 316
Solution:
10110101100 = 0101 1010 1100 (start group making from right. Add 0s when necessary, on left)
Step 1: convert the decimal equivalent of each hexadecimal digit to 4 binary digits.
Step 2: combine all the resulting binary groups into a single binary number.
Solution:
Step 1: convert the decimal equivalent of each hexadecimal digit to 4 binary digits.
Solution:
Finally, table 3.2 summarises the relationship between the decimal, binary, hexadecimal, and octal
number system. Note that the maximum value for a single octal digit of octal (7) is equal to the
maximum value of three digits of binary. The value range of one digit of octal duplicates the value
range of three digits of binary. If octal digits are substituted for binary digits, the substitution is one a
one-to-three basis. Thus, computers that print octal number instead of binary, while taking memory
dump, save one-third of the printing space and time.
Similarly, not that the maximum value of one digit in hexadecimal is equal to the maximum value of
four digits in binary. Thus, the value range of one digit of hexadecimal is equivalent to the value
range of four digits of binary. Therefore, hexadecimal shortcut notation is a one-to-four reduction in
the space and time required for memory dump.
FRACTIONAL NUMBERS
In binary number system, fractional numbers are formed in the same general way as in the decimal
system. Just as it is.
Thus, the binary point serves the same purpose as the decimal point. Some of the positional values
in the binary system is given below.
Binary
point
Position 4 3 2 1 0 . -1 -2 -3 -4
Position 24 23 22 21 20 2-1 2-2 2-3 2-4
value
Quantity 16 8 4 2 1 ½ 1/4 1/8 1/16
represented
the symbols an, an-1, …., a-m used in the above representation should be one of the b symbols allowed
in the number system.
And
Example 3.26 find the decimal equivalent of the binary number 110.101
Solution:
= 4 + 2 + 0 + .5 + 0 + .125
= 6.62510
Example 3.27 find the decimal equivalent of the octal number 127.54
Solution:
= 64 + 16 + 7 + 5/8 + 4/64
= 87.687510
Example 3.28 find the decimal equivalent of the hexadecimal number 2B.C4
Solution:
= 32 + B + C/16 + 4/256
= 43 + 0.75 + 0.015625
= 43.76565210