Sie sind auf Seite 1von 4

/ $Ptfw Name~ u

Date \l
B·,\\V"\P.""
/ 1j/ l°i Period _1_
~ Activity 2.3.4 Two's Complement Arithmetic

Introduction
Do negative numbers exist? Did you know that great mathematicians throughout history argued about
the very existence of negative numbers? William Frend, a 16th century European mathematician, refused to
accept the existence of negative numbers. In his book The Principles of Algebra (1796), he wrote:

"to attempt to take [a number] away from a number less than itself is ridiculous."

Even Augustus DeMorgan, author of the famed DeMorgan Theorems, thought that numbers less than
zero were unimaginable.
We all know now that negative numbers do exist. We learned about them in the third grade, and we
use them every day. For example, a golfer who scores a 67 on a par 72 course would describe his score as 5
under par, or -5. Likewise, in the northern climate of the United States, the winter temperatures can drop to
10° below zero, or-1O° Fahrenheit.

j If negative decimal numbers exist and you can convert a decimal number into its binary equivalent,
then there must be a way to represent negative binary numbers.
In this activity you will learn how t• express numbers in their 8-bit - 2's complement binary equivalent.
You will use these equivalencies to perform simple addition and subtraction.

Equipment
• Calculator (preferably one with a number base conversion feature)

Procedure - Show your work on a separate sheet of paper


1) Express the positive decimal numbers as their 8-bit - 2's complement binary equivalent (negative).
Express the negative decimal numbers as their 8-bit - 2's/omplement binary equivalent (positive).

a) 114(10): - 5'.<j'(, ::; \(2..100\\\ ~ (2) \ ¼e<-<~ •IIA <,irv1:{1SM\ ...,_, ,~\ ) )

b) -49 (10) = C\~\ (2)

c) 87 (10) = - °\ \3 (2)

d) -108 (10) = ~qi, (2)

e) -97 (10) = go3 (2)

2) Express the positive decimal numbers as their 8-bit - 2's complement binary equivalent (negative).
Express the negative decimal numbers as their 8-bit - 2's complement binary equivalent (positive).

a) 11011001 (2) = IQ O I\ ~ 0 \ \ 0 : ;) C\ (10)

--~ b) 01110100 (2) = \o oo \\QO (10)

~ -:,'
c) 10110001 (2) = o, -o o\ \ \. \ (10)

d) 10111101 (2) = 0~0-0-00 \\ · (10)

\Woo\ J\
e) 00011011 (2) = (10)
onve rting
answers b'/ c
check your
.. . 2's complement form. d adding.
3) Perform each of the following add1t1ons in . d ·mat equivalents an
the 2's complement binary numbers into their ec1

0 '0 '01'0110
a) + 0 0 1 10 10 1
Q\l.'.)0\ 0\\

, 0 ·111 0 1 0 0
b) + 1 0 10 1 0 1 1
oo o \ 11 ,,

fo o 1111 o
\ \ I \

c) + 0 0 1 0 10 1 1
\ \ O OlOO \

, I I l I 1

11011101
d} + 11 1 Q Q Q 1 1
\ , 0 0 00 00

41 After-com,ertmgeach decimal number to its S~bit - 2's complement binary equivalent, perform the
foD()'Ming arithmetic operations. Check your answers by converting the 2' s complement binary
numbe<s into their decimal equivalents.
(Remember, subtraction is the same as addition of a negative number.)

a}
23
+ 14
OC\ QD\O\

b}
36
28
OO.:>oloo,o

c} (-47)
69
I
T

Oo:,, .:>\\i) -

46 ,,.
I

+(-72)
~
..L
Cont\usion
1) What is the \argest positive and largest negative decimal number that can be expressed as an 8-bit - 2's
comp\ement binary number?
4- \2 t :: '()\ \\ \\\\
_ \ 1. ~ \uao o o<)o
1
2) Without performing any binary-to-decimal conversions, which of the following binary numbers must
be -49?
a) 00110001
~ 11001111
c) 01100110

How were you able to determine this?

T\-\~ M ~/t ~~-\ e,~~e-J 1\1\c -;:.'J"'' S\V\£e ~ ~ l-1\ ':)~ OV\ ('lo~ \~
1 ) ~ lA\ ,I ) ~~ (71,'\\~ Qt...V\)\,J'C{ 1\A-.J " " V\ e1"'"-\ \v-£ ~ k \
V\,
~JDlC\l '14 (\,J- L\9 J(c') ~7 (<))-\o~ l~)-ql
,~ --+--
-~~ 5
-q
C\.".)0 ~ l 2
I
zq l qoz
-~ib C\~' -qc3
~

\ Q Ov\ \ \ 0

c~~)\101\()0\ ~\Qll\0\00 (_c. ) \0\\000\ ld)\O\\l\O\ (g)OC~llo\l ,


OO\vO \ \O \ 0~ 0 \ D \ \ 0 \ OIJ I I I 0
I I
01 00001 0 ltlOOlOv
. -

00 \ 01> \ t \ Ol oo I II I o\ ooo~\ \ \IIOvl o;> \


. I .

Das könnte Ihnen auch gefallen