Grablo Help Grablo Help
  • User Manual
  • Tips
  • News
  • Go to
    • Grablo Home
    • Grablo App
  • 한국어
Grablo Help Grablo Help
문의하기
Grablo Help Grablo Help
  • User Manual
  • Tips
  • News
  • Go to
    • Grablo Home
    • Grablo App
  • 한국어
loading
  1. Home
  2. Tips
  3. Basics
  4. Bits and Bytes
Updated on August 11, 2025

Tips

  • Folder icon closed Folder open iconBasics
    • Bits and Bytes
    • Digital Input/Output
    • Digital/Analog Signals
    • Calculating LED Resistor Values
    • Pull-up/down Resistors
    • 3.3V ↔ 5V Conversion
    • Serial Communication (UART)
    • DC Motor, Servo Motor, Stepper Motor
    • Multi Thread
    • Relay
  • Folder icon closed Folder open iconHardware
    • Raspberry Pi
      • GPIO
      • Installing Operating System
      • How to Change 1-Wire Pin
      • How to Find I2C Device Addresses
      • Raspberry Pi vs Arduino
      • Serial (UART) Port
      • Using Desktop Environment with VNC
    • Beagle Bone
      • GPIO
      • Installing Operating System
    • Jetson Nano
      • GPIO
      • Installing Operating System
    • GPIO Expander
      • FT232H/FT2232H/FT4232H
      • MCP2221A
      • NUMATO USB-GPIO
  • Folder icon closed Folder open iconLinux
    • Linux Directory Structure
    • Configuring Linux Auto Login
    • Installing Linux on Windows (Virtual Machine)
    • Installing Linux on macOS (Virtual Machine)
    • Installing SSH Server
    • Finding Your Controller’s IP Address
    • Connecting via SSH
    • Transferring Files Between PC and Controller
    • Fixing “User is not in the sudoers file” Error
  • Folder icon closed Folder open iconAudio/Video
    • Fixing Audio Stuttering and Latency Issues
    • Playing Audio Through Bluetooth Speakers
    • Selecting Instruments from SoundFont Files
    • Fixing “Failed to create new vlc instance” Error
  • Folder icon closed Folder open iconDatabase
    • Setting Up Firebase Database
  • Folder icon closed Folder open iconIoT
    • Setting Up Google Cloud TTS/STT
    • Setting Up OpenAI TTS/STT
    • Setting Up ElevenLabs TTS
    • Setting Up Telegram Bot
    • Getting Data from WeatherAPI.com

Bits and Bytes

Estimated reading: 3 minutes 293 views

Bit

Switch

We press a switch to turn a light on or off. When the switch is turned on, electricity flows and the light turns on, and when the switch is turned off, electricity doesn’t flow and the light turns off.

​

​

​

Digital devices such as Arduino, Raspberry Pi, and computers can perform various and complex tasks, but their fundamental operating principle is the same as turning a light on and off with a switch. The only difference is that they operate a very large number of switches at extremely high speeds. Today’s computer CPUs contain billions of transistors (switches) and can turn switches on or off billions of times per second.

​

Data Representation

So how is it possible to write documents, browse the internet, or watch videos simply by turning switches on and off?

Computers interpret the “on” state of internal switches as 1 and the “off” state as 0. Therefore, computers can only use 0 and 1 to represent any data, which is called binary.

Here, one digit of binary (0 or 1) is called 1 bit. For example, the decimal number 3 is 11 in binary and has two digits, so it is 2 bits.

The numbers that can be represented with 2 bits are as follows, totaling 4 numbers (22):

Binary Decimal
00 0
01 1
10 2
11 3

Therefore, the number of values that can be represented with n bits is 2n.

In this way, computers represent all data such as numbers and characters using binary with 0s and 1s, and can perform various and complex tasks using this data.

​

Byte

Why It’s Used

As explained earlier, various data can be represented using bits, but computers do not use bits as the unit for data processing. Since data varies in size such as 6 bits, 17 bits, 196 bits, etc., the CPU would need to access data addresses bit by bit to read bits individually, requiring frequent operations.

Example) The decimal number 37 is 100101 in binary and can be represented with 6 bits.
However, it’s inefficient because the CPU needs to read or write 6 times to process one small number.


Instead, computers process data in 8-bit groups, which is called 1 byte. By using 8 bits as the minimum unit, some unnecessary bits may be added in certain cases, causing capacity waste, but it has the advantage of very efficient and fast processing.

Example) The decimal number 37 is binary 100101, and 00 is added at the front to make it 00100101, which is 8 bits (1 byte) for processing. The CPU only needs to read or write once, making it very efficient.

​

Hex Code

Since byte values processed by computers are inconvenient for humans to read when displayed in binary, Hex code (hexadecimal value) is the value displayed using hexadecimal. Since 1 byte can be displayed with 2-digit Hex code, bytes can be efficiently represented. Hex code is usually prefixed with 0x to indicate that it is hexadecimal.

Example) Binary 11111111 = Hexadecimal (Hex code) 0xFF

찾으시는 내용이 없나요? 문의하기

문의하기

공유하기

Bits and Bytes

Or copy link

Clipboard Icon
콘탠츠

ㅤ

Grablo Inc.
support@grablo.co

Site Links

  • Grablo Home
  • Grablo App

이 사이트의 모든 컨텐츠는 저작권법에 보호받는 저작물로서, 무단으로 복제, 배포하는 경우에는 저작권법에 의하여 처벌을 받을 수 있습니다. Copyright 2024 grablo.co. All Rights Reserved.