0% found this document useful (1 vote)
973 views2 pages

Twos Complement Exercise

This document provides examples of calculating two's complements. It first shows that the 8-bit two's complement of 26 in binary is 11100110. It then demonstrates that the decimal representation of the 8-bit two's complement number 11010011 is -45. Specifically, it shows taking the one's complement then adding 1 to get the two's complement number, before converting it to decimal.

Uploaded by

KramMark
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
973 views2 pages

Twos Complement Exercise

This document provides examples of calculating two's complements. It first shows that the 8-bit two's complement of 26 in binary is 11100110. It then demonstrates that the decimal representation of the 8-bit two's complement number 11010011 is -45. Specifically, it shows taking the one's complement then adding 1 to get the two's complement number, before converting it to decimal.

Uploaded by

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

Two's Complement Exercises

Answers:
1. Find the 8-bit two's complement of 26

10

a) write the 8-bit binary representation of 26


26 = (16 + 8 + 2) = 11010 = 00011010
10

10

10

b) switch all the 1's to 0's and 0's to 1's


11100101

c) add 1 in binary notation


11100101
+
1
11100110

Therefore, the 8-bit two's complement of 26 is 11100110 .


10

2. Find the decimal representation of the two's complement number 11010011

a) find the two's complement of 11010011


1. switch all 1's to 0's and 0's to 1's ; 11010011

00101100

2. add 1 in binary notation


00101100
+
1
00101101

b. write the decimal representation of 00101101

00101101 = (32 + 8 + 4 + 1) = 45
2

10

10

Therefore, the decimal representation of the two's complement 11010011 is -45 .


2

10

You might also like