0% found this document useful (0 votes)
93 views41 pages

Number System

Bishwajit Mazumder Nursing Instructor Dhaka Nursing College, DhakaTopic: Number System of ComputerLevel: Midwifery 1st year
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views41 pages

Number System

Bishwajit Mazumder Nursing Instructor Dhaka Nursing College, DhakaTopic: Number System of ComputerLevel: Midwifery 1st year
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 41

Bishwajit Mazumder

Nursing Instructor
Dhaka Nursing College,
Dhaka
Topic: Number System of
Computer
Level: Midwifery 1st year

Introduction
Computer is an advanced electronic device
that takes raw data as input from the user and
processes these data under the control of set of
instructions (called program) and gives the result
(output) and saves output for the future use.
It can process both numerical and nonnumerical (arithmetic and logical) calculations.

10/01/16

Characteristics of
computers:

o The major characteristic of computer can be classified


in to speed, accuracy, diligence, versatility and memory
which are as follows:
o 1) Speed : The computer is able to process the date and
give the output in fractions of seconds such that
required information is given to the user on time
enabling the user to take right decisions on right time.
A powerful computer is capable of executing about 3
million calculations per second.

10/01/16

Characteristics of computers
(cont)

o 2) Accuracy : In spite of its high speed of processing,


the computers accuracy is consistently high enough
which avoids any errors. If it all there are errors, they
are due to errors in instructions given by the
programmer.
o 3) Reliable : The output generated by the computer is
very reliable, but it is reliable only when the data, which
is passing as input to the computer and the program,
which gives instructions are correct and reliable.

10/01/16

Characteristics of
computers (cont)
o 4) Storage Capacity : The computer has a provision to
store large volumes of data in the small storage
devices, which have capacity to store huge amounts
of data and help the retrieval of data an easy task.
o 5) Versatile : The computer perform three basic
operations.
a) It is capable to access and accept information
through various input-output devices from the user.
b) It performs basic Arithmetic and Logic operations
on data as desired.
10/01/16

Characteristics of
computers (cont)
c) It is capable to generate the desired output
in the desired form.
6) Automation : Once the instructions fed into
computer it works automatically without any
human intervention until the completion of
execution of program until meets logical
instructions to terminate the job.

10/01/16

Limitation of Computer
o 1) Computer does not work on itself, it requires set of
instructions to be provided, and else computer
(Hardware) is waste.
o 2) Computer are not intelligent, they have to be
instructed about each and every step which they have
to perform.
o 3) Computers cannot take decisions on its own, one
has to program the computer to take an action if some
conditional prevail.
o 4) Computers, unlike humans cannot learn by
experience.
10/01/16

Number system
o Introduction
Every computer stores number, letters, and other
special characters in coded form. Before going into the
details of these codes, it is essential to have a basic
understanding of a number used number systems by
computer professionals and relationship among them.
Computer data looks especially strange because
people normally use base 10 to represents numbers. The
decimal numbers system (deci means 10 in Latin) is
called base 10 because 10 symbols are available: 0, 1, 2,
3, 4, 5, 6, 7, 8, and 9. Each symbol in a number is called
digit. So 10 is a two digit number.
10/01/16

Types of Number system


Number systems are two types:
1. Non-positional number system
2. Positional number system
Non-positional number system
Number systems are two types-non-positional and
positional. In early days, human beings counted on
fingers. When counted beyond ten fingers, they used
stones, pebbles, or sticks to indicate values. This method
counting uses an additive approach or non-positional
number system.
10/01/16

Positional number system


. In this system, we have symbols such as I for 1, 2 for II,
3 for III, 4 for IIII, 5 for IIIII, etc. Since it is very
difficult to perform arithmetic with such a number
system, positional number systems were developed. In a
positional number system, there are only a few symbols
called digits. These symbols represent different values,
depending on the position they occupy in a number.
Characteristics of positional power:
1. The value of the base determines the total number of
different symbols or digits are available in the number
system. The first of these choices is always zero.
2. The maximum value of single digit is always equal one
10/01/16
10
less than the value of the base.

Positional number system (cont)


The number system, which we use in our day to day life
is called the decimal number system. In this system, the
base of the equal to 10, there are altogether 10 symbols or
digits(0, 1, 2, 3, 4, 5, 6, 7, 8, 9).
Examples of decimal system number 2586(written
258610) consists of the digits 6 in the units position, 8 in
ten position, 5 in hundred position, and 2 in thousand
position, and its value can be written as:
(2*1000)+(5*100)+(8*10)+(6*1)=2000+500+80+6=258
6
10/01/16

11

Binary Number System


In binary number system, the value of the base is 2.
Hence, it has only two symbols or digits (0 and 1), the
largest single digit being 1 (one less than the base).
Each position in a binary number represents the power
of the base (2). Hence, in this system, the right most
position in unit (20) position, the second position from
the right is 2's (21) position, and proceeding in this way,
we have 4's (22) position, 8's (23), 16's (24) position, and
so on.
Therefore, decimal equivalent of binary number
10101(101012) is:
(1*24)+(0*23)+(1*22)+(0*21)+(1*20)=16+0+4+0+1=21
10/01/16

12

In order to the specific about which system we


are referring to, it is common practice to indicate
the base as a subscript. Hence, we write,
101012=2110
Binary
Decimal equivalent
000
O
001
1
010
2
011
3
100
4
101
5
110
6
111
7
10/01/16

13

Octal number system


In the octal number system, the base is 8. Hence, there
are only eight symbols or digit: 0, 1, 2, 3, 4, 5, 6, 7, (8
and 9 do not exist in this system). The largest signal is
7(one less than the base).
Each position is an octal number represents a power of
the base (8). Therefore, the decimal equivalent of the
octal number 2057(written as 20578) is :
(2*83)+(0*82)+(5*81)+(7*80)=1024+0+40+7=1071
Hence, 20578=104710

10/01/16

14

Hexadecimal number system


The hexadecimal number is one with a base of 16,
having 16 signal character digits or symbols.
The first 10 digits are the digits of the decimal number
system- 0, 1, 2, 3, 4, 5, 6, 7, 8, ,9.
The remaining six digits are denoted by the symbols A,
B, C, D, E, and F representing the decimal values 10, 11,
12, 13, 14, and 15respectedly.
Hence, the largest signal is For 15(one less than the
base). Each position in the hexadecimal system
represents a power of the base (16).

10/01/16

15

Hexadecimal number system (cont)


Therefore, the decimal equivalent the hexadecimal
1AF(written as 1AF16) is :
(1*162)+(A*161)+
(F*160)=(1*256)+(10*16)+(15*1)=256+160+15=431
Hence, 1AF16=43110
Observe that since there are only 16 digits in the
hexadecimal number system, 4 bites(24=16) are
sufficient to represents any hexadecimal number in
binary.
10/01/16

16

Relationship among Decimal, Binary,


Hexadecimal, and octal number systems
Decimal

Hexadecima Binary
l

Octal

0
1
2
3
4
5
6
7

0
1
2
3
4
5
6
7

0
1
2
3
4
5
6
7

0
1
10
11
100
101
110
111

17

Hexadecimal, and octal number systems (Cont)


Decimal

Hexadecima Binary
l

Octal

1000

10

1001

10

1010

11

1011

12

1100

13

1101

14

1110

15

1111

16

10

10000

10/01/16

18

Converting to Binary to Decimal


Example: 110012=?10
Step 1: Determine column value

Column number (from


right)

Column value

1
2
3
4
5

20=1
21=2
22=4
23=8
24=16

1
2
4
8
16

19

Converting to Binary to Decimal (cont)


Step2:Multiply column values by corresponding
column digits
16
*1

8
*1

4
*0

16
8
0
Step 3: Sum of total products
16+ 8+ 0+ 0+1 =25
Hence, 110012=2510

10/01/16

2
*0

1
*1

20

Converting Octal to Decimal


Example: 47068= ?10
Step 1: Determine column value
Column number
(from right)

Column value

1
2
3
4

80
81
82
83

10/01/16

1
8
64
512

21

Converting Octal to Decimal (cont)


Step2:Multiply column values by corresponding
column digits
512
64
8
1
*4
*7
*0
*6
2048
448
0
Step 3: Sum of total products
2048 + 448 + 0 + 6 =2502
Hence, 47068=250210

10/01/16

22

Hexadecimal to Decimal
Example: 1AC16=?10
Here, 1AC16=1*162 +A*161 +C*160
=1*256 +10*16 +12*1
=256+160 +12
=428
Hence, 1AC16=42810

10/01/16

23

Computer code
Numeric data:
We see or understand that binary numbers are coded
to represent characters in computer.
Binary coding schemes are used in computers to
represent data internally.
In binary coding, every symbol which appears in data
is represented by a group of bits. The group of bits
used to represent a symbol is called a bite.
However, the term of bite is commonly used to mean
an 8-bit (a group of 8 bits), because most of the
modern computers used to 8bits to represent a
symbol.
10/01/16

24

Binary coded Decimal Code


The Binary coded Decimal (BCD) code is one of the
early computer codes.
It is based on the idea of converting each digit of a
decimal number in to binary equivalent, rather than
converting the entire decimal value into a pure binary
form.
The BCD equivalent of each decimal digit is shown fig 1.
Since 8 & 9 requires 4 bits, all decimal digits are
represented in BCD by 4bits.
Example, 4210 is equal to 1010102 in a pure binary form.
Converting 4210 in to BCD , however the following result:
4210=0100

10/01/16

0010 or 0100010 in BCD.

25

BCD equivalent of decimal digits


Decimal digits
0
1
2
3
4
5
6
7
8
9
10/01/16

BCD Equivalent
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001

26

American Standard Code for


Information Interchange (ASCII)
Another computer code which is widely used is the
American Standard Code for Information Interchange
(ASCII).
ASCII has been adopted by several American
computer manufactures as their computers' internal
code.
This code is popular in data communications, is used
almost exclusively to represent a data internally
microcomputers, and is frequently found in the larger
computers produced by some vendors.
27

ASCII (cont)
ASCII is of two types - ASCII7 and ASCII8. ASCII7 is
a 7-bit code, which allows 128(27) different characters.
The first three bits are used as zone bits.
Microcomputers using 8-bits bite (group of 8 bits for 1
bite).

Computer Arithmetic: Information is handled in a


computer by electronic/ electrical components, such as
transistors, semiconductors, wires, etc., all of which
can only indicate two states of conditions- on(1) or
off(0).
10/01/16

28

Computer Arithmetic- Binary


Transistors are either conducting (1) or no conducting
(0); magnetic materials are either magnetized (I) or no
magnetized (0) in one direction or in opposite direction;
a pulse or voltage is present (I) or absent (0) in wire.
All information represented within the computer by the
presence or absence of these types of signals.
The binary system, which has only two digits (0 and 1),
is most suitable for expressing the two possible states.
The concept of binary components is illustrated in fig. 1.
10/01/16

29

Computer Arithmetic- Binary (cont)


By using binary numbers, computer circuits only
have to handle two binary digits, rather than ten
decimal digits.
This greatly simplifies the internal circuit design of
computers, resulting in less expensive and more
reliable circuit.
Finally, everything that can be done in decimal
number system can also be done in binary number
system.

10/01/16

30

Logic gate
All operations within a computer are carried out by means
of combinations of signal passing through standard block
of built-in circuits, which are known as logic gate.
In other words, a logic gate as an electronic circuit, which
operates on one or more input signals, to produce
standard output signals. These logic gates are building
blocks of all the circuits in computer.
Computer circuits are built up using combination of
different type of logic gates to perform the necessary
operation.
These are sufficient to introduce the concept of circuit
design by using logic gate.
31

Logic gate (cont)


Types of logic gate:
1. AND Gate
2. OR Gate
3. NOT Gate
4. NAND Gate
5. NOR Gate
AND Gate:
An AND gate is the physical realization of the logical
multiplication operation.
It is electronic circuit which generates an output signal
of 1, only if all input signals are also 1.
32

AND Gate
To have a conceptual idea, let us consider the case of figure
2.
Here, two switches A and B are connected in series.
It is obvious that the input current will reach the output
point, only when both the switches are in the on (1) state.
There will be on output (output=0), if either one or both the
switches are in the off (0) state.
Hence, two or more switches connected in series behave as
an AND gate.
The behavior of logic gate , that is , the state of output
signal, depending on the various combinations of input
signals, is conveniently represented by means of truth table.
33

AND Gate (Cont)


The truth table and the block diagram symbols for an
AND gate, for two input signal are shown in figure 2.
Science there are only two inputs (A and B), only
four (22) combinations of inputs are possible.
Also observe from the truth table that an output of 1
is obtained, only when both the inputs are in 1 state,
otherwise it is 0. Input

Truth table:

Output

C=A+
B

34

OR Gate
An OR gate is the physical realization of the logical
addition (OR) operation.
It is an electronic circuit which generates an output
signal of 1, if any of the output signals is also 1.
Two or more switches connected the parallel behave
as an OR gate.
It can be seen from the figure 3 that the input current
will reach the output point, when any one of the two
switches are in the on (1) state.
There will be no output, only when the both switches
(A and B) are in the off (0) state.
10/01/16

35

OR Gate (Cont)
The truth table and the block diagram symbol for an
OR gate, for two input signals, are shown in figure 4.
Observe that, an output of 1 is obtained, when any of
the input signals is1.
Truth table:
Input

10/01/16

A
0
0
1
1

Output
B
C=A+B
0
0
1
1
0
1
1
1

36

NOT Gate
A NOT gate is the physical realization of the
completion operation. It is an electronic circuit which
generates an output signal, which is the reverse of the
input signal.
A NOT gate is also known as an inverter because it
inverts the output.
The truth table and the block diagram symbol for a
NOT gate are shown in figure 4.
Recall that the complementation is unary operation,
which is defined on a single variable. Hence, a NOT
gate always has a single input.
10/01/16

37

NAND Gate

A NAND gate is a complemented AND gate. That is


the output of NAND gate will be a 1, if any one of the
inputs is a 0 and it will be a 0, only when all the
inputs are 1.
The truth table and the block diagram symbol for a
NAND gate are shown in figure 6. The symbol of
is usually used to represent a NAND operation in
Boolean expression (In algebra can be derived by
systemiclly progressing from input to output on the
gate).
10/01/16

38

NOR Gate
A NOR gate is a complemented OR gate. That is, the
out put of a NOR gate will be a 1 , only when all
inputs are 0, and it will be a 0, if any input is a 1.
figure 5.

10/01/16

39

At last, Please Imagine,


Anything more ????

10/01/16

40

A lot of thanks,
For your concentration.

10/01/16

41

You might also like