Title: Theory / Unimportant / CS / Hardware / Digital logic and computer design / Binary
Tags: fromAlgorithm hasNotNewEffectReturnsMeaning fromImplementation Wrong_taylor_series mid1516974248815 toUnary effectNew hasSeenConjDef instructionToImplementation

Name: A base
Definition: The number of elements used to represents a number
Page: 4
Chapter: 1
Section: 2
Context: Arithmetic
Name2: A radix

Name: Decimal system
Definition: System of representation of numbers with base 10
Page: 4
Chapter: 1
Section: 2

Name: Hexadecimal system
Definition: System of representation of numbers with base 16
Page: 5
Chapter: 1
Section: 2

Definition: \(\sum_{i=-m}^na_ir^i\)
Page: 4
Chapter: 1
Section: 2
Variables: \(r\) a base,
Notation: \(a_n\dots a_1a_0.a_{-1}\dots a_{-m}\) in base \(r\)

Name: Binary system
Definition: System of representation of numbers with base 2
Page: 4
Chapter: 1
Section: 2

Question: Which symbols are used to represent a number in base \(r\) ?
Answer: If \(r\le 10\), the \(r\) first digits. Otherwise, if \(10<r\le 36\), the \(i\)-th letter of Latin alphabet denote the \(10+i\)-th digit
Page: 4
Chapter: 1
Section: 2
Variables: \(r\) a base,

Name: Octal system
Definition: System of representation of numbers with base 8
Page: 5
Chapter: 1
Section: 2

Name: The augend
Definition: The first element of an addition
Page: 6
Chapter: 1
Section: 2

Name: The addend
Definition: The second element of an addition
Page: 6
Chapter: 1
Section: 2

Name: The sum
Definition: The result element of an addition
Page: 6
Chapter: 1
Section: 2

Name: The minuend
Definition: The first element of a substraction
Page: 6
Chapter: 1
Section: 2

Name: The subtrahend
Definition: The second element of a substraction
Page: 6
Chapter: 1
Section: 2

Name: The difference
Definition: The result of a substraction
Page: 6
Chapter: 1
Section: 2

Name: The product
Definition: The result of a multiplication
Page: 6
Chapter: 1
Section: 2

Name: The multiplicand
Definition: The first elements of a multiplication
Page: 6
Chapter: 1
Section: 2

Name: The multiplier
Definition: The second elements of a multiplication
Page: 6
Chapter: 1
Section: 2

Page: 6
Implementation: For \(i\) from \(-m\) to \(n+1\):
\(b_i:=a^1_i-a^2_i+r_{i}\mod r\)
\(r_{i+1}=\lfloor a^1_i-a^2_i+r_{i}\rfloor\)
Result is in \(b_{n+1}\dots b_0.b_{-1}\dots b_{-m}\)
An undefined value is assumed to be 0
Section: 2
Chapter: 1
Effect: \(\vec{a^1}-\vec{a^2}\)
Variables: \(r\) a base,
\(a^i_n\dots a^{i}_1a^{i}_0.a^{i}_{-1}\dots a^{i}_{-m}\) numbers in base \(r\)
Space complexity: Proportional to the second elements.

Page: 6
Implementation: \(\sum_{i={-m_1}}^{n_1}r^{i}a ^2_i{a^1}\), using algorithms for multiplication by a digit and sum
Section: 2
Chapter: 1
Effect: \(\vec{a^1}\times\vec{a^2}\)
Variables: \(r\) a base,
\(a^i_{n_i}\dots a^{i}_1a^{i}_0.a^{i}_{-1}\dots a^{i}_{-m_i}\) numbers in base \(r\)

Page: 6
Implementation: For \(i\) from \(-m\) to \(n+1\):
\(s_i:=a^1_i+a^2_i+r_{i}\mod r\)
\(r_{i+1}=\lfloor a^1_i+a^2_i+r_{i}\rfloor\)
Result is in \(s_{n+1}\dots s_0.s_{-1}\dots s_{-m}\)
An undefined value is assumed to be 0
Section: 2
Chapter: 1
Effect: \(\vec{a^1}+\vec{a^2}\)
Variables: \(r\) a base,
\(a^i_n\dots a^{i}_1a^{i}_0.a^{i}_{-1}\dots a^{i}_{-m}\) numbers in base \(r\)

Page: 6
Implementation: For \(i\) from \(-m\) to \(n+1\):
\(p_i:=ba_i+r_{i}\mod r\)
\(r_{i+1}=\lfloor ba_i+r_{i}\rfloor\)
Result is in \(p_{n+1}\dots b_0.b_{-1}\dots p_{-m}\)
An undefined value is assumed to be 0
Section: 2
Chapter: 1
Effect: The product of \(\vec a\) and \(b\)
Variables: \(r\) a base,
\(a_{n}\dots a_1a_0.a_{-1}\dots a_{-m_i}\) numbers in base \(r\),
\(b\) a digit

Question: How to convert between binary and hexadecimal
Answer: Convert bits 4 by four, starting from the dot
Page: 9
Chapter: 1
Section: 4

Question: How to convert between binary and hoctal
Answer: Convert bits 3 by 3, starting from the dot
Page: 9
Chapter: 1
Section: 4

Definition: encoding \(N\) as \(r^n-1-N\)
Page: 10
Section: 5
Chapter: 1
Variables: \(r\) a basis
\(n\) digits
Name: Diminished radix complement
Definition2: changing each digit \(d\) by \(r-1-d\)
Name2: \(r-1\)'s complement
Involutary: Involutive

Definition: Encoding of \(r^n-N\) for \(N\ne 0\), and \(0\) as 0
Page: 10
Section: 5
Chapter: 1
Variables: \(r\) a basis
\(n\) digits
Name: Radix complement
Definition2: \((r-1)\)'s complement, plus one.
Name2: \(r\)'s complement
Involutary: Involutive

Page: 12
Implementation: \(M-N\)
Section: 5
Chapter: 1
Effect: \(r\)'s complement of the sum of \(M\) and the complement of \(N\)
Variables: \(r\) a basis
\(n\) digits
\(M,N\) int

Name: The signed-magnitude convention
Definition: Encoding a signed number with a sign number plus the absolute value of the number.
Page: 15
Chapter: 1
Section: 5
Variables: \(r\) a basis
\(n\) digits

Name: The signed-complement convention
Definition: a sign number,
Page: 15
Chapter: 1
Section: 5
Variables: \(r\) a basis
\(n\) digits
Definition2: the number if it is positive, its complement otherwise
Conjdef: Encoding a signed number with
Extra: examples