Intern Track Roadmap

Binary & data representation

This course explains how computers store data as 0s and 1s, starting from transistors and the binary system. It covers bits, bytes and the difference between KB and KiB, binary addition, bitwise operations, shifts and two's complement. It shows how ASCII and UTF-8 turn text into bytes, why floats cannot hold most decimals precisely, and how hexadecimal writes binary compactly, including CSS colors. The last lesson connects these ideas to Ruby strings, symbols, integers, ActiveRecord column types and pack and unpack.

What you'll learn

  • ✓Counting and converting numbers in binary, decimal and hexadecimal
  • ✓Bits, bytes and the difference between decimal and binary size units
  • ✓Bitwise operations, bit shifts, two's complement and integer overflow
  • ✓How ASCII, Unicode and UTF-8 encode text, and how to fix mojibake
  • ✓Why floats are approximate and how to store money with decimal or integer cents
  • ✓How Ruby objects, strings, symbols and ActiveRecord columns map to bytes
Free preview · Lesson 1 5 min read

What is binary?

You count using ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. This is the decimal system (base-10), and you use it because you have ten fingers.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...