7.1 BASE CONVERSION

Given the representation of a number in a specific system, conversion operations consist of finding the representation of this number in another system. Arithmetic algorithms deal with a diversity of systems such as base-B for naturals or signed systems for integers; the most common signed systems are sign-magnitude, B's complement, excess-k, or signed-digit systems such as Booth coding. Finally, special attention is paid to floating-point representations for computer applications. Redundant systems are also important in arithmetic operations, among others in multiplication (Booth algorithm, Chapter 5) or division (SRT, Chapter 6). Booth coding and redundant base-B coding are generally related to specific algorithms; the conversion techniques are therefore developed in the sections devoted to the respective algorithms. Floating-point conversion is reviewed in Chapter 16. The most classic problem to deal with is the base conversion for base-B unsigned representations: given a number by its representation in base B1, find its corresponding representation in base B2.

Let the base-B1 (source system) representation of a natural number x be given by

image

weighted sum of powers of B. The problem at hand is to compute the base-B2 (target system) representation of x

image

A first ...

Get Synthesis of Arithmetic Circuits: FPGA, ASIC and Embedded Systems 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.