Sign & Modulus

(integer representation)

 

This is a method to represent negative numbers. The leading bit indicates “+” or “-“

 

“0” indicates “+” or positive

“1” indicates “-“ or negative

 

Four bit representation gives us the numbers 7 to -7

 

7

 

1

1

1

 

 

 

7

 

0

1

1

1

 

6

 

1

1

0

 

 

 

6

 

0

1

1

0

 

5

 

1

0

1

 

 

 

5

 

0

1

0

1

 

4

 

1

1

0

 

 

 

4

 

0

1

1

0

 

3

 

0

1

1

 

 

 

3

 

0

0

1

1

 

2

 

0

1

0

 

 

 

2

 

0

0

1

0

 

1

 

0

0

1

 

 

 

1

 

0

0

0

1

 

0

 

0

0

0

 

 

 

0

 

0

0

0

0

also 1000

 

 

 

 

 

 

 

 

-1

 

1

0

0

1

 

 

 

 

 

 

 

 

 

-2

 

1

0

1

0

 

 

 

 

 

 

 

 

 

-3

 

1

0

1

1

 

 

 

 

 

 

 

 

 

-4

 

1

1

0

0

 

 

 

 

 

 

 

 

 

-5

 

1

1

0

1

 

 

 

 

 

 

 

 

 

-6

 

1

1

1

0

 

 

 

 

 

 

 

 

 

-7

 

1

1

1

1

 

 

Eight bit representation extends the maximum and minimum numbers

The highest positive number is 0111 1111 or 127

The lowest negative number is 1111 1111 or -127

 

 

 

8

 

 

0

0

0

0

 

1

0

0

0

 

 

7

 

 

0

0

0

0

 

0

1

1

1

 

 

6

 

 

 

 

 

 

 

 

 

 

 

 

 

5

 

 

 

 

 

 

 

 

 

 

 

 

 

4

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

0

0

0

0

 

0

0

0

0

Also 1000 0000

 

-1

 

 

 

 

 

 

 

 

 

 

 

 

 

-2

 

 

 

 

 

 

 

 

 

 

 

 

 

-3

 

 

1

0

0

0

 

0

0

1

1

 

 

-4

 

 

 

 

 

 

 

 

 

 

 

 

 

-5

 

 

 

 

 

 

 

 

 

 

 

 

 

-6

 

 

 

 

 

 

 

 

 

 

 

 

 

-7

 

 

1

0

0

0

 

0

1

1

1

 

 

-8

 

 

1

0

0

0

 

1

0

0

0

 

 

    

Hosted by www.Geocities.ws

1