Automatically translated.View original post

🧠 What is the number 0, 1 in a computer?

🧠 What is the number 0, 1 in a computer? Why does the digital world only have these two?

Have you ever wondered why the information, pictures, videos, music or text that we see on the computer screen is made up of just these two numbers 0 and 1? Today we're going to unravel the secrets of the digital world.

Compare 0 to 1 with "light switch."

To explain it as easily as possible, think of a light switch in our home:

* 1 (on): means there is electricity flowing through or "on."

* 0 (off): means no electricity; or "off"

Computer systems also work on the same principle, using billions of "electronic circuits" that can be turned on or off, "on" instead of 1, and "off" instead of 0.

How do 0 and 1 generate data?

Each of the numbers 0 and 1 is called a bit, which is the smallest unit of data in a computer. When multiple bits are arranged, more complex data can be generated:

* 8 bits = 1 byte (Byte): For example, the letter "A" in a computer system is represented by a binary code consisting of 8 bits.

* 1024 bytes = 1 kilobyte (KB): It can store data equal to about 1 page of plain text.

* 1024 kilobytes = 1 megabyte (MB): Can hold 1 picture or 1 song

You can see that these 0 and 1 numbers are not alone, but are combined into a series of data that we use every day.

Conclusion

So 0 and 1 are like the basic "language" that computers use to communicate and process everything from letters, images, to videos we watch on YouTube. Next time, look at your computer and think about the millions of tiny light switches that are running.

I hope this post will make it easier for friends to understand the principles of computer operation. If you like IT content like this, don't forget to click like and comment. 😊

# Technology # Trending # Lemon 8 Howtoo # lemon 8 diary # Computer

2025/8/12 Edited to

... Read moreถ้าเคยเจอคำถามว่า “ในยุคของข้อมูลสารสนเทศ การเข้ารหัสข้อมูลเป็นชุดของเลข 1 และ 0 เรียกว่ารูปแบบใด” คำตอบหลักๆ คือ “รหัสไบนารี (Binary)” หรือพูดให้ตรงฐานเลขก็คือ “เลขฐานสอง (Base-2)”. เราอาจเห็นเขาเรียกรวมๆ ว่า “การแทนข้อมูลแบบดิจิทัล” ด้วย เพราะสุดท้ายมันคือการแทนทุกอย่างให้เหลือสถานะ 2 แบบที่วงจรอิเล็กทรอนิกส์ทำได้ง่ายที่สุด: เปิด/ปิด (1/0) ทำไมต้องเป็นไบนารี? จากประสบการณ์อ่าน/ลองแกะพื้นฐานคอมฯ จะพบว่าในฮาร์ดแวร์จริงๆ สัญญาณไฟฟ้ามันไม่ได้นิ่ง 100% การมีแค่ 2 ระดับ (0 กับ 1) ทำให้ทนสัญญาณรบกวนได้ดี ออกแบบวงจรให้เสถียรและราคาถูกกว่า ระบบเลยยึดหลัก “ภาษาลับที่คอมพิวเตอร์เข้าใจ” คือ 0/1 นี่แหละ แล้ว “การเข้ารหัสข้อมูล” ที่คนชอบถาม หมายถึงอะไรบ้าง? 1) การแทนค่า/การเข้ารหัสตัวอักษร (Character encoding) เช่น ภาษาอังกฤษเคยนิยม ASCII ที่กำหนดว่า A = 65 (เลขฐานสิบ) ซึ่งถ้าแปลงเป็นไบนารีจะได้ 01000001 (8 บิต = 1 ไบต์) ส่วนปัจจุบันข้อความหลายภาษาใช้ UTF-8 ทำให้เก็บไทย จีน อีโมจิ ฯลฯ ได้ 2) การแทนข้อมูลสื่อ (ภาพ/เสียง/วิดีโอ) ก็ยังเป็น 0/1 เหมือนเดิม แค่กติกาการจัดเรียงต่างกัน เช่น ไฟล์ภาพมีการเก็บค่าสีของพิกเซล ไฟล์เสียงเก็บ “ตัวอย่างสัญญาณ” เป็นช่วงๆ แล้วค่อยบีบอัดเป็น MP3/AAC คำที่ควรรู้เพื่อไม่สับสนเวลาอ่านบทความไอที: - บิต (bit) = หน่วยเล็กสุดของข้อมูล มีค่าได้ 0 หรือ 1 - ไบต์ (byte) = 8 บิต มักใช้แทน 1 ตัวอักษรในระบบพื้นฐาน - กิโลไบต์/เมกะไบต์ ฯลฯ = ปริมาณข้อมูลที่เกิดจากการเรียง 0/1 จำนวนมาก สรุปสั้นๆ: รูปแบบที่เข้ารหัสข้อมูลด้วยเลข 1 และ 0 เรียกว่า “ไบนารี/เลขฐานสอง” และทุกไฟล์ในเครื่องเรา ไม่ว่าข้อความ รูป หรือวิดีโอ สุดท้ายก็แตกออกมาเป็นชุดบิตจากวงจรอิเล็กทรอนิกส์ที่เปิดแทน 1 ปิดแทน 0 นั่นเอง