Algorithms

Sign bit

The first bit of a signed number: 0 if it's positive and 1 if it's negative.

Example

In 8-bit sign and magnitude, +5 is 0000 0101 and −5 is 1000 0101: only the first bit changes.

Test yourself: Sign bit

How numbers are stored

In sign and magnitude, the first bit gives the number's ___.

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.