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
0or1.Since there are only two possible options (\(2\) degrees of freedom), it is called binary.
A bit string is a sequence of bits.
Â
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 tod-1and has \(d\) degrees of freedom.A dit string is a sequence of dits.
Â
For a string of length \(n=4\), give the formula for the total possible number of (i) bit strings and (ii) dit strings. ðŸ§
Answer
Each bit represents a variable and each variable has only 2 options, i.e. 0 or 1.
For a bit string of length \(n=4\):
For a dit string of length \(n=4\) :
Â
For a string of any length \(n\), give the formula for the total possible number of (i) bit strings and (ii) dit strings. ðŸ§
Answer
For any length \(n\), the total possible # of bitstrings:
For any length \(n\), the total possible # of ditstrings:
Â