The computer used to calibrate an electric ferry records a change in motor torque as an 8-bit two's complement binary number. During a harbour test, the eng...

Assessment: Computer Science 9210 | Paper 2 Mock 01 | Concepts and principles of computer science Subject: Computer Science - 9210

Question 1 Report

The computer used to calibrate an electric ferry records a change in motor torque as an 8-bit two's complement binary number. During a harbour test, the engineer sees the diagnostic display in Fig. 1. A negative number means that the control algorithm must reduce torque. The computer has allocated one byte of memory for each reading.

Torque adjustment, binary10011010© EAGLE BEACON GLOBAL

Fig. 1

(a) State whether the number in Fig. 1 is positive or negative. [1]
(b) Give the decimal value represented by the binary number in Fig. 1. Show your working. [3]
(c) State the greatest positive decimal number that can be stored in this 8-bit two's complement format. [1]
(d) Give one reason why two's complement is used instead of storing a separate sign symbol and an unsigned binary magnitude. [1]

Answer Details

(a) The most significant bit is 1. In two's complement, this indicates a negative number. [1]

(b) To find the magnitude of a negative two's complement number, invert every bit and add 1:

Stored value:  10011010
Invert bits:   01100101
Add 1:         01100110

\(01100110_2=64+32+4+2=102\). Since the original value was negative, the decimal value is −102. [3]

(c) For an 8-bit two's complement number, the greatest positive value is \(2^7-1=127\). One bit is used to distinguish positive from negative values. [1]

(d) Two's complement allows addition and subtraction to use the same binary arithmetic circuitry for positive and negative values. This is an advantage over separate sign-and-magnitude storage. [1]

Examination reminder: Do not treat a negative two's complement number as ordinary unsigned binary. Invert and add 1, then apply the negative sign.

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning