Skip to Content
Introduction to Digital Systems: Modeling, Synthesis, and Simulation Using VHDL
book

Introduction to Digital Systems: Modeling, Synthesis, and Simulation Using VHDL

by Mohammed Ferdjallah
July 2011
Intermediate to advanced content levelIntermediate to advanced
225 pages
6h 22m
English
Wiley
Content preview from Introduction to Digital Systems: Modeling, Synthesis, and Simulation Using VHDL

2.6 BINARY ARITHMETIC

2.6.1 Addition of Unsigned Numbers

Numbers that are always considered to be positive are designated unsigned numbers; numbers that can take up negative values are designated signed numbers. An addition operation using unsigned numbers is carried out pretty much like a decimal addition process. The only difference is that in binary arithmetic we use only two digits: 0 and 1. The following examples illustrate the four basic results of adding only 2 bits.

images

images

Figure 2.5 Sign Contraction

The following examples illustrate the addition of unsigned binary numbers. Decimal addition was included for arithmetic verification.

images

Note that the result of the second example has 5 bits instead of 4. Therefore, we must be careful when dealing with binary arithmetic for large numbers. When implemented in circuits that have fixed number lengths, the last bit will be considered the overflow. When adding unsigned binary numbers, the resulting sum may be larger than the size of the internal registers of the digital system.

2.6.2 Subtraction of Unsigned Numbers

The subtraction operation is performed as an addition operation using the two's-complement method. When subtracting unsigned ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Digital Systems Design with FPGAs and CPLDs

Digital Systems Design with FPGAs and CPLDs

Ian Grout
Synthesis of Arithmetic Circuits: FPGA, ASIC and Embedded Systems

Synthesis of Arithmetic Circuits: FPGA, ASIC and Embedded Systems

Jean-Pierre Deschamps, Gery J.A. Bioul, Gustavo D. Sutter

Publisher Resources

ISBN: 9780470900550Purchase book