\(\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:
Bit Strings
Needed by:
Digital Integers
Links:
Sheet PDF
Graph PDF

Digital Naturals

Why

We want to associate the natural numbers with bit strings for use on digital computers.1

Definition

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

Correspondence with $\N \cup \set{0}$

We associate $x \in \set{0, 1}^d$ corresponds to the number $\sum_{i = 1}^{d} x_i 2^i$. For example, the bit string $(0,0,0) \in \set{0, 1}^3$ corresponds to the natural number $0 \in \omega $. Likewise, $(1, 0, 0)$ corresponds to $1 \in \N $, $(0, 1, 0)$ corresponds to 2, $(1, 1, 0)$ corresponds to 3, etc.

Call the function so defined the digital natural decoder, and denote it by $f: \set{0, 1}^d \to \N \cup \set{0}$. In other words $f((0, 0, 0)) = 0$, $f((0, 1, 0)) = 2$, etc. Call the set $f(\set{0, 1}^d)$ the set of naturals representable by length-$d$ bit strings.

Specifically, if, for $n \in \N \cup \set{0, 1}$, there exists $x \in \set{0, 1}^d$ so that $f(x) = n$, we say that $x$ is representable in $d$ bits.

Correspondence between $d$ and $k > d$ bit naturals

Let $x \in \set{0, 1}^d$ and $y \in \set{0, 1}^k$ with $k > d$. Although $\set{0, 1}^d \not\subset \set{0, 1}^k$, $f(\set{0, 1}^d) \subset f(\set{0, 1}^k)$. We can identify $x \in \set{0, 1}^d$ with $x' \in \set{0, 1}^k$ where $x' = (x_1, \dots , x_d, 0, \dots , 0)$ so that $f(x) = f(x')$. Clearly then, if $x$ is representable in $d$ bits, it is representable in $k > d$ bits.

Addition

We want to define addition $\oplus: \set{0, 1}^d \times \set{0, 1}^d \to \set{0, 1}^d$ so that $f(x \oplus x') = f(x) + f(x')$. In general, we are stuck, because $x + x'$ may not be representable in $d$ bits. Suppose, however and for the time being, that it is.2


  1. Future editions will expand. ↩︎
  2. Future editions will complete. ↩︎
Copyright © 2023 The Bourbaki Authors — All rights reserved — Version 13a6779cc About Show the old page view