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.3 NUMBER CONVERSIONS

Conversions of binary numbers to other number systems, and vice versa, are common in input-output routines. The following sections illustrate the conversion of numbers between number representation systems.

2.3.1 Decimal-to-Binary Conversion

Learning by example would probably be the best way to become familiar with number conversions. The decimal value of a binary number is easily calculated by summing the power terms with nonzero coefficients. Continuous division by 2 obtains the binary form of a decimal number until the final result is equal to zero. The remainder is saved after each division step. The first remainder is the least significant bit (LSB) and the last remainder is the most significant bit (MSB) of the resulting binary number. The following example illustrates decimal-to-binary conversion.

images

Therefore,

images

A conversion is carried out by first dividing the given decimal number by 2. The quotient that results from each division step is again divided by 2 and the remainders are noted in each step. The remainders form the actual binary number. The quotient from the first division step forms the least significant bit (LSB) and the quotient from the last division step forms the most significant bit (MSB).

2.3.2 Decimal-to-Octal Conversion

The same process ...

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