\(\DeclarePairedDelimiterX{\Set}[2]{\{}{\}}{#1 \nonscript\;\delimsize\vert\nonscript\; #2}\) \( \DeclarePairedDelimiter{\set}{\{}{\}}\) \( \DeclarePairedDelimiter{\parens}{\left(}{\right)}\) \(\DeclarePairedDelimiterX{\innerproduct}[1]{\langle}{\rangle}{#1}\) \(\newcommand{\ip}[1]{\innerproduct{#1}}\) \(\newcommand{\bmat}[1]{\left[\hspace{2.0pt}\begin{matrix}#1\end{matrix}\hspace{2.0pt}\right]}\) \(\newcommand{\barray}[1]{\left[\hspace{2.0pt}\begin{matrix}#1\end{matrix}\hspace{2.0pt}\right]}\) \(\newcommand{\mat}[1]{\begin{matrix}#1\end{matrix}}\) \(\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}\) \(\newcommand{\mathword}[1]{\mathop{\textup{#1}}}\)
Needs:
Digital Naturals
Integer Numbers
Needed by:
Digital Symbols
Floating Point Representations
Links:
Sheet PDF
Graph PDF

Digital Integers

Why

We want to associate elements of $\Z $ with bitstrings for use on digital computers.1

Definition

A digital integer is a bit-string. The set of $d$-bit integers is the set of length-$d$ bit strings $\set{0, 1}^d$. For example, the set of 8-bit digital integers is the set $\set{0, 1}^8$.

Correspondence with $\Z $

The bit string $x \in \set{0, 1}^d$ corresponds to the integer $\sum_{i = 1}^{d} x_i 2^i$.

Notation

We denote the set of 8-bit (16-bit, 32-bit, 64-bit) integers by int64 (int8, int16, int32).

It is easy to embed $x$ in int8 by considering $x'$ in int16 defined by

\[ x' = (x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, 0, 0, 0, 0, 0, 0, 0, 0) \]

In other words, we associate an 8-bit integer with a 16-bit integer.

Naturally, we associate the integers with bit strings.

Signed integers

2
  1. Future editions will discuss digital computers. ↩︎
  2. Future editions will include an account of signed integers, or will place this in another sheet. ↩︎
Copyright © 2023 The Bourbaki Authors — All rights reserved — Version 13a6779cc About Show the old page view