2 Binary Representations

Objective:

This chapter shows how bits can be used to represent numbers and characters. The codes presented for integers are sequential binary, octal, hexadecimal, Gray, and BCD. The codes for negative integers are sign-magnitude, one’s complement, and two’s complement. The codes for real numbers are single and double-precision floating-point. And finally, the codes for characters are ASCII and Unicode.

2.1 Binary Code

When we press a number, such as 5, in a calculator’s keypad, two things happen: On one hand, the number ...

Get Digital Electronics and Design with VHDL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.