None's Tech Blog

Simple thoughts, clean code, and lessons learned.

Understanding How Computers Read Binary

Computers don't understand words or pictures directly — they work with binary, which means everything is represented by just two digits: 0 and 1. These digits are called bits.

For example, the number 5 in binary is 101. Each bit represents a power of two:


2^2   2^1   2^0
 1     0     1  → 4 + 0 + 1 = 5
      

This simple concept is the foundation of everything — from images and videos to complex AI algorithms. Every click, every pixel, every sound ultimately comes down to patterns of ones and zeros.

Writing Cleaner Code: Small Functions, Big Impact

Code readability matters more than you think. A clean, well-structured function can save hours of debugging later. Consider this example:


// Messy version
function process(x, y) {
  if(x) {
    y = y * 2;
    console.log(y);
  } else {
    console.log(y + 10);
  }
}

// Cleaner version
function processValue(value, flag) {
  const result = flag ? value * 2 : value + 10;
  console.log(result);
}
      

The second version is shorter, clearer, and communicates intent. Writing good code is not about doing more — it’s about doing it simply.