0% found this document useful (0 votes)
71 views29 pages

Number System'

The document discusses information representation in digital systems. It covers key topics such as binary numbers, number base conversions between binary, octal and hexadecimal, complements used for subtraction, signed binary numbers to represent positive and negative values, and various binary codes to represent digits. The overall summary is that the document provides an overview of fundamental concepts for representing and manipulating information in digital systems using binary numbers and codes.

Uploaded by

Bramara Sri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views29 pages

Number System'

The document discusses information representation in digital systems. It covers key topics such as binary numbers, number base conversions between binary, octal and hexadecimal, complements used for subtraction, signed binary numbers to represent positive and negative values, and various binary codes to represent digits. The overall summary is that the document provides an overview of fundamental concepts for representing and manipulating information in digital systems using binary numbers and codes.

Uploaded by

Bramara Sri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

BINARY SYSTEM

Contents:
1.
2.
3.
4.
5.
6.
7.
8.

INFORMATION REPRESENTATION
Binary Numbers
Number Base Conversions
Octal and Hexadecimal Numbers
Complements
Signed Binary Numbers
Binary Codes
Binary Logic

INFORMATION
REPRESENTATION:
1.
2.
3.
4.
5.
6.
7.
8.
9.

INFORMATION REPRESENTATION
Binary Numbers
Number Base Conversions
Octal and Hexadecimal Numbers
Complements
Signed Binary Numbers
Binary Codes
Binary Storage and Registers
Binary Logic

INFORMATION
REPRESENTATION

Digital system examples: Digital telephones, digital


TV, DVD, digital cameras (DC), digital videos (DV),
and digital computers.

Digital systems: Manipulate discrete data

Binary: Numbers are presented by two discrete values


(0 and 1), Binary digit = Bit

Group of bits: Binary code

Digital systems: A system manipulates discrete


elements of information that is represented internally
binary form.

HDL (Hardware description language): A programming


language and suitable for describing digital circuits in
textual form.

INFORMATION
REPRESENTATION
Numbers are important to computers
Represent information precisely
Can be processed

Examples
Represent yes or no: use 0 and 1
Represent the 4 seasons: 0, 1, 2 and 3

Sometimes, other characters are used


Matriculation number: 8 alphanumeric
characters
(e.g. U071234X)

INFORMATION
REPRESENTATION
Bit (Binary digit)

0 and 1
Represent false and true in logic
Represent the low and high states in
electronic
devices

Other units
Byte: 8 bits
Nibble: 4 bits (seldom used)
Word: Multiples of byte (e.g. 1 byte, 2
bytes, 4 bytes, 8 bytes, etc.), depending
on the architecture of the computer
system

INFORMATION REPRESENTATION
N bits can represent up to 2N values.
Examples:
2 bits represent up to 4 values (00, 01, 10,
11)
3 bits rep. up to 8 values (000, 001, 010, ,
110, 111)
4 bits rep. up to 16 values (0000, 0001, 0010,
., 1111)

To represent M values, log2M bits are required.


Examples:
32 values requires 5 bits

Binary Numbers:
1.
2.
3.
4.
5.
6.
7.
8.

Information Representation
Binary Numbers
Number Base Conversions
Octal and Hexadecimal Numbers
Complements
Signed Binary Numbers
Binary Codes
Binary Logic

DECIMAL (BASE 10) SYSTEM


o A weighted-positional number system
Base or radix is 10 (the base or radix of a
number
system is the total number of
symbols/digits
allowed in the system)
Symbols/digits = { 0, 1, 2, 3, 4, 5, 6, 7, 8,
9}
Position is important, as the value of each
symbol/digit is dependent on its type
and its position in the number.
Example, the 9 in the two numbers below
has different values:
(7594)10 = (7 103) + (5 102) + (9 101) + (4

100)

Decimal

number 7392:

7392=7103+ 3 102+ 9 101+ 2 100


Decimal

number representation:

In general,

(anan-1 a0 . f1f2 fm)10 =


(an x 10n) + (an-1x10n-1) + + (a0 x 100)
+
(f1 x 10-1) + (f2 x 10-2) + + (fm x 10-m)

Decimal Number with Binary Number:


11010.11=26.75

124+ 123+ 022+ 121+ 020+12-1+ 122


=26.75
To

evaluate the decimal number 593.68, the


digit in each position is multiplied by the
corresponding weight:

5102 + 9101 + 3100 + 610-1 +


810-2
= (593.68)10

OTHER NUMBER SYSTEMS


Binary

(base 2)

Weights in powers of 2
Binary digits (bits): 0, 1
Octal

(base 8)

Weights in powers of 8
Octal digits: 0, 1, 2, 3, 4, 5, 6, 7.
Hexadecimal

(base 16)

Weights in powers of 16
Hexadecimal digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A,
B, C, D, E, F.
Base/radix

R:

Weights in powers of R

Number Base Conversions


1.
2.
3.
4.
5.
6.
7.
8.

Digital Systems
Binary Numbers
Number Base Conversions
Octal and Hexadecimal Numbers
Complements
Signed Binary Numbers
Binary Codes
Binary Logic

DECIMAL TO BINARY CONVERSION


o Method 1
Sum-of-Weights Method.

o Method 2
Repeated Division-by-2 Method (for
whole
numbers)
Repeated Multiplication-by-2 Method (for
fractions)

SUM-OF-WEIGHTS METHOD
Determine

the set of binary weights whose


sum is equal to the decimal number
(9)10

= 8 + 1 = 23 + 20 = (1001)2

(18)10

= 16 + 2 = 24 + 21 = (10010)2

(58)10

= 32 + 16 + 8 + 2 = 25 + 24 + 23 + 21 =
(111010)2

(0.625)10

= 0.5 + 0.125 = 2-1 + 2-3 = (0.101)2

REPEATED DIVISION-BY-2
To convert a whole number to binary, use
successive division by 2 until the quotient is
0. The remainders form the answer, with
the first remainder as the least significant
bit (LSB) and the last as the most significant
2 43
bit (MSB).
2 21 rem 1 LSB
(43)10 = (101011)2

2
2
2
2

10
5
2
1
0

rem 1
rem 0
rem 1
rem 0
rem 1 MSB

REPEATED MULTIPLICATION-BY-2
To convert decimal fractions to binary,
repeated multiplication by 2 is used, until the
fractional product is 0 (or until the desired
number of decimal places). The carried
digits, or carries, produce the answer, with
the first carry as the MSB, and the last as the
LSB.
(0.3125)10 = (.0101)
0.31252 2=0.625
0.6252=1.25
0.252=0.50
0.52=1.00

Carry
0
1
0
1

MSB

LSB

Octal and Hexadecimal Numbers

1.
2.
3.
4.
5.
6.
7.
8.

Digital Systems
Binary Numbers
Number Base Conversions
Octal and Hexadecimal Numbers
Complements
Signed Binary Numbers
Binary Codes
Binary Logic

BINARY TO OCTAL/HEXADECIMAL
CONVERSION
Binary Octal: partition in groups of
3
(10 111 011 001 . 101 110)2 =

Octal Binary: reverse


(2731.56)8 =

Binary Hexadecimal: partition in


groups of 4
(101 1101 1001 . 1011 1000)2 =

Hexadecimal Binary: reverse


(5D9.B8)16 =

Complements
1.
2.
3.
4.
5.
6.
7.
8.

INFORMATION REPRESENTATION
Binary Numbers
Number Base Conversions
Octal and Hexadecimal Numbers
Complements
Signed Binary Numbers
Binary Codes
Binary Logic

COMPLEMENTS
Complements are used in digital computers
for
simplifying the subtraction operation and
for
logical manipulation.
1. The radix complement
----- Given a number N in base-r having n
digits, the rs complement of N:
rn - N, for N0
0, for N=0
2. The diminished radix complement.
----- Given a number Nin base-r having n digits,
the (r-1)s complement of N : (rn-1) -N

1s and 2s Complements
The 2's complement and l's complement for
binary numbers.
1s complement of N = (2n-1) N (N is a
binary #)
1s complement can be formed by changing
1s to 0s and 0s to 1s.
2s complement of a number is obtained by
leaving all
least significant 0s and the first
unchanged, and replacing 1s with 0s and 0s
with 1 in all higher significant digits.
The 1s complement of 1101011 = 0010100
The 2s complement of 0110111 = 1001001

9s and 10s Complements


10's

complement and 9's complement


are for decimal numbers.
The

9s complement of546700 is
999999 -546700 = 453299

10s

(rs) complement of decimal 2389


7610 (9s complement) +1= 7611

Subtraction Using Complements

Add the minuend, M, to the rs complement of


subtrahend, N. This performs M + (rn-N) = MN + rn
If MN, the sum will produce an end carry, rn,
which can be discarded; what is left is the
result M-N.
If M<N, the sum does not produce an end
carry and is equal to rn-(N-M), which is the rs
complement of (N-M). To obtain the answer in a
familiar form, take the rs comp
of the sum and place a negative sign in front.

Subtract 1010100 1000011 using


2s complement.
A=
2s complement of B =

1010100
+

Sum =

0111101
10010001
end carry

Discard end carry =


Answer =

10000000
0010001

SIGNED BINARY NUMBERS


1.
2.
3.
4.
5.
6.
7.
8.

INFORMATION REPRESENTATION
Binary Numbers
Number Base Conversions
Octal and Hexadecimal Numbers
Complements
Signed Binary Numbers
Binary Codes
Binary Logic

SIGNED BINARY NUMBERS


Unsigned

numbers: only non-negative

values.
Signed numbers: include all values (positive
and negative)
The sign is represented by a sign bit
0 for + 1 for -
E.g : a 1-bit sign and 7-bit magnitude format.

sign

magnitu
de

00110100 +1101002 = +5210

10010011 -100112 = -1910

BINARY CODES
1.
2.
3.
4.
5.
6.
7.
8.

INFORMATION REPRESENTATION
Binary Numbers
Number Base Conversions
Octal and Hexadecimal Numbers
Complements
Signed Binary Numbers
Binary Codes
Binary Logic

BINARY CODES
Decimal Digit
0
1
2
3
4
5
6
7
8
9

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

Excess-3 84-2-1
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100

0000
0111
0110
0101
0100
1011
1010
1001
1000
1111

2*421
0000
0001
0010
0011
0100
1011
1100
1101
1110
1111

Biquinary
5043210
0100001
0100010
0100100
0101000
0110000
1000001
1000010
1000100
1001000
1010000

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy