8/10/2019 NUMBERING SYSTEMS shared.ppsx
1/26
8/10/2019 NUMBERING SYSTEMS shared.ppsx
2/26
1 2
8/10/2019 NUMBERING SYSTEMS shared.ppsx
3/26
1 2
8/10/2019 NUMBERING SYSTEMS shared.ppsx
4/26
8/10/2019 NUMBERING SYSTEMS shared.ppsx
5/26
=
=
to
to
8/10/2019 NUMBERING SYSTEMS shared.ppsx
6/26
A binary numberis a number expressed in
the binary numeral system, or base-2
numeral system, which represents numeric
values using two different symbols: typically
0 (zero) and 1 (one)
More specifically, the usual base-2 system is
a positional notation with a radix of 2
http://en.wikipedia.org/wiki/Binary_number
8/10/2019 NUMBERING SYSTEMS shared.ppsx
7/26
According to wikipedia.com, octal numeral
system is the base-8 number system, and
uses the digits 0 to 7.
http://en.wikipedia.org/wiki/Octal
http://en.wikipedia.org/wiki/Numeral_systemhttp://en.wikipedia.org/wiki/Numeral_systemhttp://en.wikipedia.org/wiki/Radixhttp://en.wikipedia.org/wiki/Radixhttp://en.wikipedia.org/wiki/Numeral_systemhttp://en.wikipedia.org/wiki/Numeral_systemhttp://en.wikipedia.org/wiki/Numeral_system8/10/2019 NUMBERING SYSTEMS shared.ppsx
8/26
The decimalnumeral system has tenas its
base.
It is the numerical base most widely used bymodern civilizations.
http://en.wikipedia.org/wiki/Decimal
8/10/2019 NUMBERING SYSTEMS shared.ppsx
9/26
According to wikipedia.com, hexadecimal
(also base 16, or hex) is a positional
numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often
the symbols 09to represent values zero to
nine, and A,B,C,D,E,F(or alternatively a
f) to represent values ten to fifteen.
http://en.wikipedia.org/wiki/Hexadecima
8/10/2019 NUMBERING SYSTEMS shared.ppsx
10/26
67 mod 2 = 1
33 mod 2 = 1
16 mod 2 = 0
8 mod 2 = 0
4 mod 2 = 0
2 mod 2 = 0
1
Result :
6710 = 10000112
6710= ..... 2
R
E
AD
D
I
V
8/10/2019 NUMBERING SYSTEMS shared.ppsx
11/26
67 mod 8 = 3
8 mod 8 = 0
1
Result :
6710 = 1038
6710= ..... 8
R
E
AD
D
I
V
8/10/2019 NUMBERING SYSTEMS shared.ppsx
12/26
624 mod 16 = 0
39 mod 16 = 7
2 mod 16 = 2
0
Result :
6710 = 27016
62410= ..... 16
R
E
AD
D
I
V
8/10/2019 NUMBERING SYSTEMS shared.ppsx
13/26
1011102 = . 10(1x 25) + (0x 24) + (1x 23) + (1x 22) + (1x 21) + (0x 20
32 + 0 + 8 + 4 + 2 + 0
4610
8/10/2019 NUMBERING SYSTEMS shared.ppsx
14/26
7648 = . 10(7x 82) + (6x 81) + (4x 80)
50010
448 + 48 + 4
8/10/2019 NUMBERING SYSTEMS shared.ppsx
15/26
F516= .10(15(F)x 161) + (5x 160)
24510
240 + 5
8/10/2019 NUMBERING SYSTEMS shared.ppsx
16/26
8/10/2019 NUMBERING SYSTEMS shared.ppsx
17/26
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/Addition/index.ht
8/10/2019 NUMBERING SYSTEMS shared.ppsx
18/26
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/Subtraction/ind
8/10/2019 NUMBERING SYSTEMS shared.ppsx
19/26
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/Multiplication/inde
8/10/2019 NUMBERING SYSTEMS shared.ppsx
20/26
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/Division/index.htm
8/10/2019 NUMBERING SYSTEMS shared.ppsx
21/26
When our number ispositive, we make oursign bit zero,and whenour number is negative,we make our sign bitone.
This approach is calledthe Signed MagnitudeRepresentation.
Weakness : We need to specify how
many bitsare in ournumbers so we can becertain which bit isrepresenting the sign.
Example: First, we convert 5 to
binary.
101 (5)
Now we add a sign bit.Notice that we havepadded '1' with zeros soit will have four bits.
0101 (5)
To make our binarynumbers negative, wesimply change our signbit from '0' to '1'.
1101 (-5)
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/SignedNumbers/index
8/10/2019 NUMBERING SYSTEMS shared.ppsx
22/26
Here is a quick
summary of how to
find the 1's
complementrepresentation of any
decimal numberx.
Ifxis positive, simply
convertxto binary. Ifxis negative, write
the positive value ofx
in binary
Reverse each bit.
Example:
First, we write the
positive value of the
number in binary. 0101 (+5)
Next, we reverse
each bit of the
number so 1'sbecome 0's and 0's
become 1's
1010 (-5)
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/OnesComplement/inde
8/10/2019 NUMBERING SYSTEMS shared.ppsx
23/26
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/SubtractionWithOnesComplement/inde
8/10/2019 NUMBERING SYSTEMS shared.ppsx
24/26
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/SubtractionWithOnesComplement/inde
8/10/2019 NUMBERING SYSTEMS shared.ppsx
25/26
Here is a quick summaryof how to find the 2'scomplementrepresentation of any
decimal numberx. Ifxis positive, simply
convertxto binary.
Ifxis negative, write thepositive value ofxin
binary Reverse each bit.
Add 1 to thecomplemented number.
Example:
First, we write thepositive value of thenumber in binary.
0101 (+5) Next, we reverse each
bit to get the 1'scomplement. 1010
Last, we add 1 to thenumber. 1011 (-5)
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/TwosComplement/inde
8/10/2019 NUMBERING SYSTEMS shared.ppsx
26/26
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/SubtractionWithTwosComplement/inde