Binary numbers

In regular counting, we use ten symbols (0-9) for decimal numbers. However, computers use only two symbols (0 and 1) for binary numbers. Despite seeming limiting, this binary system is incredibly powerful. Understanding binary numbers is like having a key to a digital adventure, especially if you’re curious about how computers work and cool electronic stuff!

Why binary numbers?

Computers use binary numbers because their insides have tiny switches that can be turned on (1) or off (0), just like the numbers in binary. Inside a computer, there’s a boss called the Central Processing Unit (CPU). It’s like the brain and has millions of super tiny switches that can turn on and off really, really fast. These switches team up to do cool tricks like AND, OR, and NOT. With these tricks, the computer can handle numbers, words, pictures, sounds and even perform mathematical operations!

To remember things quickly, the CPU has a friend called Random Access Memory (RAM). RAM is like the computer’s short-term memory, made up of tiny circuits that hold the 0s and 1s. It helps the CPU process information super fast. And guess what? Even the words you see on a computer screen have a secret binary code! It’s called ASCII, and it gives each letter and symbol a special combo of 0s and 1s. So, when you use a computer, you’re basically talking in a cool binary language called the binary system!

Converting binary to decimal

Let’s turn binary fun into everyday numbers! Imagine you have the binary code 101, and you want to know its regular number friend. Here’s how you do it:

  • First, look at the rightmost digit, which is 1. That means 2 to the power of 0 times 1, which is just 1.
  • Then, check the middle digit, which is 0. That means 2 to the power of 1 times 0, and anything times 0 is 0.
  • Now, move to the leftmost digit, which is 1 again. This time it’s 2 to the power of 2 times 1, making it 4.
  • Now, add up all these results: 1 + 0 + 4 = 5. Ta-da! The regular number for the binary code 101 is 5. Easy peasy!

Converting decimal to binary

Turning regular numbers into binary code is like solving a little puzzle. Let’s say we want to change the number 23 into binary fun. Here’s how we do it using a cool method:

  1. First, divide 23 by 2. We get 11 as the answer, and there’s a little leftover 1.
  2. Now, take that 11 and divide it by 2. This time, we get 5, and there’s another leftover 1.
  3. Now, take that 5 and divide it by 2. This time, we get 2, and there’s another leftover 1.
  4. Keep going! Take that 2, divide by 2, and we get 1 with no leftovers this time.
  5. Almost there! The last step, divide 1 by 2, and we get 0 with a final leftover 1.

Now, take all those remainders in reverse order: 10111. And that’s the binary code for the number 23! It’s like a little math adventure.

AND

In the binary system, the AND operation works like a team decision. If you have two binary digits (bits), the result of AND is 1 only when both bits are 1; otherwise, the result is 0. It’s a bit like saying, “For something to happen, all conditions must be met.”

  • 1 AND 1 = 1 (because both conditions are true)
  • 0 AND 1 = 0 (because not all conditions are met)
  • 0 AND 0 = 0 (because no conditions are met)

Example: 1101​ AND 1011​ = 1001​

OR

The OR operation in binary is more like having options. If you have two bits, the result is 1 if at least one of the bits is 1. It’s like saying, “We can do this or that, and it’s okay either way.”

  • 1 OR 1 = 1 (because at least one condition is true)
  • 0 OR 1 = 1 (because at least one condition is true)
  • 0 OR 0 = 0 (because no conditions are true)

Example: 1101​ AND 1011​ = 1111

XOR

XOR, or exclusive OR, is a bit more selective. In binary, XOR gives you 1 when the bits are different and 0 when the bits are the same. It’s like saying, “We can have A or B, but not both.”

  • 1 XOR 1 = 0 (because both are the same)
  • 0 XOR 1 = 1 (because they are different)
  • 0 XOR 0 = 0 (because both are the same)

Example: 1101​ AND 1011​ = 0110

Bit, Byte, KB, MB, GB, TB

A bit is the smallest unit of data in computers and can have one of two values: 0 or 1. It’s like a tiny switch that can be either on or off. Computers use bits as the basic building blocks for storing and processing information.. Think of a bit like a tiny switch that can either be turned on or off. It’s the smallest piece of information in a computer. Imagine it as a light switch in your room – it can be either ON (1) or OFF (0). Computers use bits to store and process information,. A byte is a group of 8 bits working together.

In computers, information is represented using combinations of bits. The binary system is the foundation for this representation. Each digit in a binary number (0,1) corresponds to a bit.

1 Bit = smallest unit of data in computing

1 Byte = 8 bits

1 KB = 1024 bits

1MB = 1024KB = 1,048,576 Bytes

1GB = 1024MB

1TB = 1024GB

KB (Kilobyte), MB (Megabyte), GB (Gigabyte) and TB(Terabyte) are units of digital information storage, and they are commonly used to quantify the size of files, documents, programs, and storage capacities.

File and Folder

Think of a file as a digital container that holds information. It can be a document, a picture, a song, or even a game. Each file has its own name, like ‘my-story.docx’ or ‘cool-picture.jpg,’ and when you open it, you can see or use the information inside. The size of a file is measured in KB, MB, or GB, etc. Text documents are usually small files, but videos and applications are typically large files.

Now, imagine a folder as a virtual container that holds many files. It’s like a digital backpack or a drawer where you can keep things organized. Inside a folder, you can have different types of files. For example, you might have a “School” folder with files for each subject, like “Math,” “Science,” and “English.” Folders help keep everything tidy and make it easy to find what you need.

So, when you use a computer, you create, organize, and store your digital stuff in files and folders, just like you do with your physical things in the real world!

Scroll to Top