Quick Reference


This section really belongs in my Miscellaneous section, but since most of the content below is tech themed, I’ll just put it here under the theory that “like things belong with like things.”


Data Storage: Bits & Bytes

  • Computers are binary - they can only store data as a 0 or as 1
    • Numbers like 1, 2, 3, 4, 5… are stored as 1, 10, 11, 100, 101 => while these look like decimal numbers, they are the binary representations of 1-5
    • https://www.javatpoint.com/binary-numbers-list
    • Letters & other characters are also stored in binary by mapping a discrete character to a number
    • see Unicode, ASCII, UTF-8, & hexadecimal
      • A is mapped to ASCII Code 065 => which in binary form is 0100001
      • B is mapped to ASCII Code 066 => which in binary form is 0100010
      • ABC in binary is then: 01000001 01000010 01100011
      • in binary, text letter always begin with a “0”
      • Text to Binary mapper
  • Each 0 or 1 is a bit
  • 8 bits equals a byte
    • Why 8 bits?
    • If we had only 4 bits, there would only be 16 (2^4) possible characters, unless we used 2 bytes to represent a single character, which is more inefficient computationally. If we had 16 bits in a byte, we would have a whole lot more ‘dead space’ in our instruction set, we would allow 65,536 (2^16) possible characters, which would make computers run less efficiently when performing byte-level instructions, especially since our character set is much smaller. Additionally, a byte can represent 2 nibbles. Each nibble is 4 bits, which is the smallest number of bits that can encode any numeric digit from 0 to 9 (10 different digits).
  • ABC therefore equals 3 bytes

More details from: Bits and Bytes


Docker:


Javascript:


Markdown:


Regex:


Search Cheatsheet:


Win 10:


YAML: