Computer Science: An Overview: Global Edition (12th Edition)

Published by Pearson Higher Education
ISBN 10: 1292061162
ISBN 13: 978-1-29206-116-0

Chapter 1 - Data Storage - Chapter Review Problems - Page 87: 31

Answer

(a) 11100101 (b) 00000011 (c) 00010101 (d) 00001000 (e) 11101110

Work Step by Step

To convert decimal to 2's complement use following steps - If decimal is positive: 1- Convert the number to binary. 2- Pad 0's on left side to get required number of bits. If decimal is negative: 1- Convert the number to binary. 2- Pad 0's on left side to get required number of bits. 3- Flip all bits. 4- Add 1 to get final result. a. -27 Absolute value: 27 → 00011011 Invert: 11100100 Add 1: 11100101 Result: 11100101 b. 3 Positive → binary: 00000011 Result: 00000011 c. 21 Positive → binary: 00010101 Result: 00010101 d. 8 Positive → binary: 00001000 Result: 00001000 e. -18 Absolute value: 18 → 00010010 Invert: 11101101 Add 1: 11101110 Result: 11101110
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.