Bits and Dits#

Binary digits and binary strings 🧮#

The most basic form of computational language is binary code.

  • A bit (binary digit) is the basic unit of computational information.

  • Each bit can either take the value of 0 or 1.

  • Since there are only two possible options (\(2\) degrees of freedom), it is called binary.

  • A bit string is a sequence of bits.

\[\begin{split} \text{Bitstring} = x_1x_2x_3... x_n \\ \text{ with }x_i \in \{0,1\} \end{split}\]

 

Tertiary, quaternary and higher ‘ary’s 🔢#

  • A dit is a unit of information with \(d\) possible options.

  • Each dit can either take the value of 0, 1, …, up to d-1 and has \(d\) degrees of freedom.

  • A dit string is a sequence of dits.

\[\begin{split} \text{Ditstring} = y_1y_2y_3... y_n \\ \text{ with }y_i \in \{0,1,..,d-1\} \end{split}\]

 

For a string of length \(n=4\), give the formula for the total possible number of (i) bit strings and (ii) dit strings. 🧠

 

For a string of any length \(n\), give the formula for the total possible number of (i) bit strings and (ii) dit strings. 🧠

Â