Coding numbers in computers

Add to my library

H1210 V1 Article

Coding numbers in computers

Author : Daniel ETIEMBLE

Publication date: November 10, 2023 | Lire en français

Add to my library Add to my library

Logo Techniques de l'Ingenieur You do not have access to this resource.
Request your free trial access! Free trial

Already subscribed?

Overview

ABSTRACT

Since processors only operate with binary digits (bits), coding is necessary to represent the different types of numbers.  Integer and Floating-point formats handled by general-purpose processors are presented along with the basic arithmetic operations and how they are implemented in the processors' instruction sets. More specific formats (fixed point, decimal, reduced floats, Posit numbers) are also presented and discussed.

Read this article from a comprehensive knowledge base, updated and supplemented with articles reviewed by scientific committees.

Read the article

AUTHOR

  • Daniel ETIEMBLE : Engineer from INSA Lyon - Professor Emeritus, Université Paris Saclay

 INTRODUCTION

Since processors and digital electronic systems in general operate solely on binary digits called bits, number processing requires coding.

The different representations involve several aspects:

  • format presentation ;

  • basic arithmetic operations (addition, subtraction, multiplication, division) with the possible problems of overflow;

  • instruction sets for the various operations, with variations depending on the instruction set.

The n-bit integer formats represent unsigned or signed integers. While positive numbers always have the same representation, different representations of negative numbers have been defined: sign and absolute value, complement to 1, complement to 2, the latter being the only one used for decades. For integer operations, the number of output bits is different from the number of input bits. An n-bit + n-bit addition produces an n+1-bit result, and an n-bit * n-bit multiplication produces a 2n-bit result. Dealing with carry (addition) or n most significant bits (multiplication) poses problems for both scalar instructions and SIMD instructions in the various instruction sets.

Single-precision (32-bit) and double-precision (64-bit) float formats have been standardized since the mid-1980s (IEEE 754). They are presented here, along with the more recent reduced 16-bit and 8-bit formats used in deep neural networks. Block float and decimal float formats are also presented. The Posit format, proposed by J.L. Gustafson as an alternative to IEEE 754 float formats, is presented and discussed.

While integer and float formats have been used in general-purpose processors for decades, computational models such as neural networks and energy consumption issues have led to the emergence of reduced formats that can be added to certain general-purpose instruction sets, or implemented in specialized processors, IPs, FPGAs and so on.

You do not have access to this resource.
Logo Techniques de l'Ingenieur

Exclusive to subscribers. 97% yet to be discovered!

You do not have access to this resource. Click here to request your free trial access!

Already subscribed?


KEYWORDS

integer format   |   floating point format   |   fixed point format   |   arithmetic operations   |   BCD   |   16 and 8 bits floats   |   Posit numbers

Ongoing reading
Coding numbers in computers

Article included in this offer

"Software technologies and System architectures"

( 230 articles )

Complete knowledge base

Updated and enriched with articles validated by our scientific committees

Services

A set of exclusive tools to complement the resources

View offer details

Dans les ressources documentaires

Processeurs à grand nombre de cœurs (manycores)

Cet article présente les processeurs à très grand nombre de cœurs (manycores), avec les caractéristiques ...

Architecture des ordinateurs : CPU et coprocesseurs/accélérateurs

Les différents coprocesseurs/accélérateurs utilisés pour accélérer l'exécution des programmes dans certai...

Hiérarchie mémoire : les caches

Entre le ou les processeurs d'un ordinateur et les organes de stockage existe une hiérarchie de mémoires,...

Processeurs : exécution pipeline des instructions

Cet article présente les caractéristiques essentielles de l'exécution pipeline des instructions dans les ...

WhitePaper
4 January 2023
Introduction à l’intelligence artificielle

l\'IA s\'emploie à résoudre les problématiques qui relèvent de diverses activités humaines (perception, prise de décision, planification, diagnostic, interpréta...

Tous les livres blancs
Article Le darkweb, entre phantasme et réalité
1 August 2016
Le darkweb, entre phantasme et réalité

Il ne se passe pas une semaine sans qu’un média ou un homme politique présente le darkweb comme la Cour des Miracles version numérique. La réalité est plus nuan...

Toutes les actualités
Contact us