All courses / Data Structures and Algorithms for Game Devs / Bits and bytes
Counting in binary
Demo lesson, about 10 min, +25 XP
Every structure in this course is a way to lay numbers out in memory and find them again. A list, a dictionary and a map grid all come down to that. So the course starts with the smallest piece there is: one number, and the bits that hold it.
You met bits and bytes in C# Basics, and you printed numbers with Convert.ToString(number, 2). This lesson teaches you to read those ones and zeros on sight, to count with them, and to turn text full of ones and zeros back into a number.
Read the rest of this lesson and run the code in your browser.