Eduqas A-Level Computer Science A500QS
Data Structures: Arrays, Records and Hash Tables
Stacks, Queues, Linked Lists and Trees
Boolean Logic and Simplification
Algorithms, Pseudo-Code and Programming Constructs
Variables, Scope, Parameters and Identifiers
Recursion and Modular Programming
Sorting Algorithms
Searching and Shortest-Path Algorithms
Big O Notation and Algorithm Efficiency
Validation, Verification and Testing
Data Compression
Programming Paradigms and Computer Languages
Systems Analysis, Maintenance and Documentation
System Design and Human-Computer Interaction
Software Engineering Tools and Translators
Computing, Society and the Law
Computer Architecture, the Processor and Assembly Language
Input, Output and Secondary Storage
Networks, Protocols and the Internet
Data Transmission and Network Performance
Number Systems and Binary Arithmetic
Data Types, Characters and Floating Point
Files, Records and File Organisation
Databases, Normalisation and Entity Modelling
SQL, Big Data and Distributed Systems
The Operating System and Its Modes
Interrupts, Memory Management and Scheduling
Types of Software System
Data Security, Cryptography and Attack
Number Systems and Binary Arithmetic
Two's complement and sign and magnitude
- 3 things to know
- Component 2
Overview
The two ways of writing a negative number in a fixed-length store, their ranges, the two representations of zero that one of them suffers, and why arithmetic is easier in the other.
What you need to know
Answer each one before you reveal it.
Write −45 in 8-bit sign and magnitude.
State the range of 8-bit sign and magnitude representation.
Questions from this subtopic
Each one with the model answer underneath.
- 1
How is a negative number written in sign and magnitude form?
Model answer
The most significant bit is used as a sign, with 0 for positive and 1 for negative. The remaining bits hold the magnitude as an ordinary binary number.
- 2
Write −45 in 8-bit sign and magnitude.
Model answer
Denary 45 is 0101101 in seven bits. With a sign bit of 1 the full pattern is 10101101.
- 3
State the range of 8-bit sign and magnitude representation.
Model answer
8-bit sign and magnitude covers −127 to +127. The seven magnitude bits reach 127 and the sign bit chooses the direction.
- 4
Give the main drawback of sign and magnitude representation.
Model answer
Sign and magnitude has two representations of zero, 00000000 and 10000000. Arithmetic also needs extra logic, because the signs must be compared before adding.
- 5
How is a negative number written in two's complement?
Model answer
The positive value is written in binary, every bit is inverted, and 1 is added. The most significant bit then carries a negative place value.
- 6
Write −45 in 8-bit two's complement.
Model answer
Denary 45 is 00101101, which inverts to 11010010. The addition of 1 gives 11010011, which is 211 minus 256, or −45.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Number Systems and Binary Arithmetic, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.