Digital Electronics and Design with VHDL

Chapter 2: Binary Representations

Overview

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.

Chapter Contents

2.1

Binary Code

2.2

Octal and Hexadecimal Codes

2.3

Gray Code

2.4

BCD Code

2.5

Codes for Negative Numbers

2.6

Floating-Point Representation

2.7

ASCII Code

2.8

Unicode

2.9

Exercises

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 is sent to the display so the user can be assured that the right key was pressed; on the other hand, the number is sent to the circuit responsible for the calculations. However, we saw in Section 1.3 that only two-valued (binary) symbols are allowed in digital circuits. So how is the number 5 actually represented?

The most common way of representing decimal numbers is with the sequential binary code, also referred to as positional code, regular binary code, or simply binary code (one must be careful with this type of designation because all codes that employ only two-valued symbols are indeed binary). This is what happens to the number 5 mentioned above. Even though a different code is normally...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Pushwheel Switches
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.