A digital industrial scale is designed to measure the weight of cargo containers up to a maximum capacity of 60,000 kg60,000\text{ kg}60,000 kg. The system developers choose to store the weight as a 16-bit unsigned integer rather than a 16-bit two's complement signed integer.
Identify the primary reason for this choice.
Unsigned 16-bit registers do not experience overflow errors when the weight exceeds 60,000 kg60,000\text{ kg}60,000 kg.
Two's complement integers require an additional sign bit, meaning a 16-bit signed integer would actually require 17 bits of physical storage.
A 16-bit unsigned integer can represent positive values up to 65,53565,53565,535, whereas a 16-bit two's complement integer can only represent positive values up to 32,76732,76732,767.
Unsigned integers allow the system to represent fractional weights natively without requiring floating-point arithmetic.
117 exam-style questions on Edexcel GCSE Computer Science Binary, covering Binary representation and number of states, Unsigned and two's complement integers, Converting denary and 8-bit binary, Binary addition and binary shifts, Concept of overflow, and Hexadecimal notation and conversion. Each one has a worked solution and a mark scheme showing where the marks go.