Signed Binary Numbers-Digital Logic Design-Lecture Slides, Slides of Digital Logic Design and Programming

This course includes logic operators, gates, combinational and sequential circuits are studied along with their constituent elements comprising adders, decoders, encoders, multiplexers, as well as latches, flip-flops, counters and registers. This lecture includes: Signed, Binary, Numbers, Magnitude, Convention, Complement, Representation, Hardware, Limiation, Arithmetic, Addition

Typology: Slides

2011/2012

Uploaded on 08/07/2012

anjushree
anjushree 🇮🇳

4.4

(54)

147 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Signed Binary Numbers
In ordinary arithmetic a negative number is indicated by
minus sign and positive number by plus sign. This is not
possible in computers, because of hardware limitation
computers must represent everything with binary digits.
There are two methods to do this:
The signed magnitude convention uses the left-most bit to represent the
sign (0 for positive and 1 for negative).
The signed complement system negates a number by taking its
complement.
It could be either, 1s complement representation
or 2s complement representation.
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Signed Binary Numbers-Digital Logic Design-Lecture Slides and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Signed Binary Numbers

 In ordinary arithmetic a negative number is indicated by

minus sign and positive number by plus sign. This is not

possible in computers, because of hardware limitation

computers must represent everything with binary digits.

There are two methods to do this:

 The signed magnitude convention uses the left-most bit to represent the

sign (0 for positive and 1 for negative).

 The signed complement system negates a number by taking its

complement.

 It could be either, 1 ’s complement representation

 or 2 ’s complement representation.

Signed Magnitude Convention  The signed magnitude convention uses the left-most bit to

represent the sign (0 for positive and 1 for negative).

 The user determines whether the number is signed or unsigned

 If the binary number is signed then the leftmost bit represents the sign and

the rest of the bits represents the number

 If the binary number is unsigned then the leftmost bit is the most

significant bit of the number

 For example:

 01001 can be considered as 9 (unsigned binary) or a +9 because the

left most bit is zero.

 On the other hand, the string of bits 11001 represents binary equivalent

of 25 when considered as an unsigned number or as – 9 when considered as signed number 1 1 1 1 0 1 1 0 0 0 0 0 1 0 1 0 sign bit Negative Positive

Number Representations

 The following is the representation for +11:

 The following are different methods for representing -11:

 Signed magnitude: 10001011

 Signed-1’s-complement: 11110100

 Signed-2’s-complement: 11110101

Signed Binary Numbers

Arithmetic Addition (Signed 2’s Complement system)  This system doesn’t require the comparison of the signs

and the magnitudes (as in signed-magnitude system), but

only addition.

 The addition of two signed binary numbers with negative

numbers represented in signed-2’s complement form is

obtained from addition of the two numbers, including their

sign bits.

 A carry out of the sign-bit position is discarded.  If the sum is negative, it will be in 2’s complement form.

Arithmetic Subtraction

 Subtraction can be performed by simply converting the

equation into an addition formula.

 Take the 2’s complement of the subtrahend (including the sign bit) and

add it to the minuend (including the sign bit)

 A carry out of the sign bit position is discarded

 Note: Subtraction operation can be changed to an addition operation if the

sign of the subtrahend is changed. This is easily done by taking it’s 2’s complement

Example

 Consider the subtraction (–6) – (–13) = +

 In binary with eight bits the same is written as (11111010 –

 This subtraction is changed to addition by taking 2 ’s

complement of the subtrahend (– 13) to give (+ 13)

 In binary this is 11111010 + 00001101 = 100000111

 Removing the end carry, we obtain the correct answer:

The End