โดย Danielle Ormshaw
จุดประสงค์เดียวของ Computer คือ Send และ Receive Information ในรูป Numbers — One และ Zero
ตอนแรกเข้าใจ Weight ของ Concept นี้ ผม Transfixed ทำไมเราสร้าง Complex Interactions จาก Series ของ Ones และ Zeros ได้?
ผมอ่าน Computer Science Texts, Scoured Internet กำลัง Struggle เข้าใจว่ามัน Plug Together อย่างไร นี่คือ Guide ที่ผมอยากได้หลายเดือนก่อน เริ่ม Journey นี้
Manusiaสื่อสารด้วย Decimal System
Manusia ต้องการ Communicate ด้วย Numbers ใช้ Decimal System Decimal System มี 10 Digits (0-9) Manusia Interpret ตาม Column ที่ Digits ปรากฏ พิจารณา Decimal Number 148 เวลาอ่าน Example นี้ คุณ Subconsciously Follow Steps:
_Image Courtesy of Danielle Ormshaw
- Multiply Right-most Number ด้วย 10^0
- Multiply Middle Number ด้วย 10^1
- Multiply Left-most Number ด้วย 10^2
- Add Outputs จาก Steps 1-3
ใช้ System นี้คุณ Extrapolate Meaning ได้ถูกต้อง — One Hundred Forty Eight
ใน Decimal System เรา Multiply Digits ด้วย 10^Something ทุกครั้ง Add New Column ด้านซ้าย Power ต้อง Increase by One ดังนั้น Decimal System มี Base 10 Simple Enough?
Computers สื่อสารด้วย Binary System
Computers ต้องการ Communicate ใช้ Similar System Binary System มี 2 Digits (0,1) Break Down ได้เหมือน Decimal System คราวนี้แทน Base 10 ใช้ Base 2
พิจารณา Binary Number 110 Computer Interpret Binary Code นี้ Follow Steps:
_Image Courtesy of Danielle Ormshaw
- Multiply Right-most Number ด้วย 2^0
- Multiply Middle Number ด้วย 2^1
- Multiply Left-most Number ด้วย 2^2
- Add Outputs จาก Steps 1-3
อีกครั้ง ทุกครั้ง Add New Column ด้านซ้าย Power ต้อง Increase by One
Internet เป็น Physical System Designed to Move Information
เราเรียนรู้ Binary Code Store Information แต่งานจริงยังไง?
Internet เหมือน Amazon Delivery Courier แทน Parcels Ship Bits ไม่สำคัญ Photo หรือ Document ทุก Information บน Internet Represented ใน Bits แต่ละ Bit มี Single Binary Value (Zero or One) 8 Bits = 1 Byte
_Illustration Courtesy of Twitter: Danielle Ormshaw
Download File ไป Computer File Size มัก Kilobyte หรือ Megabyte Range Kilobyte = 1,000 Bytes Megabyte = 1 Million Bytes
Transmission Binary Information เกิดได้ 3 วิธี:
- Electric Transmission
- Fibre Optic Transmission
- Wireless Transmission
ISPs (Internet Service Providers) Supply Physical Infrastructure Support Systems นี้
Every Device Connected to Internet มี Unique Address
Order Parcel จาก Amazon Courier ใช้ Address Deliver ที่ถูกต้อง Internet ทำงาน Exactly Same Way
Google Something ส่ง Request ไป Unique String of Numbers = IP Address Requests Include Multitude of Bits และ IP Address ของ Original Device เป็น "Return Address" Recipient รู้ว่ Request มาจากไหน
แตเวลา Visit Google เราไม่ Type Numbers ใน Browser แล้ว Computer รู้ส่ง Request ไปไหน?
Internet ทำงานผ่าน Series of Protocols และ Checkpoints
Domain Name System (DNS) Convert Human-readable Web Addresses เป็น Numerical IP Addresses ถ้า DNS ไม่รู้ Address จะ Engage Network of Connected Servers หาคำตอบ
_Illustration Courtesy of Twitter: Danielle Ormshaw
2 Devices Communicate ส่ง Information ใน Packets มักต้อง Break Information เป็น Multiple Packets แต่ละ Packet มี Bytes ของ Information และ Both Sending/Receiving IP Addresses
Packets Move Through Network of Devices โดย Traffic Management System Routers Track Paths Packets May Take Identify "Cheapest" Route Cheapest Route มัก Defined as Path with Least Congestion Manage Packets Routers อาจ Consider Non-technical Factors เช่น International Politics
Packets อาจ Take Different Routes และ Often Arrive Out of Sequence Network Handle ยังไง?
Transmission Control Protocol (TCP) Act as Inventory Check ถ้า All Packets Present TCP ส่ง Acknowledgement Receipt ไป Sending Device ถ้าไม่ TCP "Refuse to Sign" Delivery และ Request Missing Packets ทั้งหมด
_Illustration Courtesy of Danielle Ormshaw
สรุป: DNS Translate Human-readable Web Addresses เป็น IP Information Broken Down, Transported, Accepted เป็น Packets Packets Contain Binary Information as Bits Electric Cables, Fibre Optic, Wireless Networks Send Bits ระหว่าง IP Addresses
What's Next?
ถ้า Post นี้ช่วยเข้าใจ Basics ให้ Appreciation ด้วย Applause หรือ Follow Twitter Happy Coding!
เรียนรู้เขียนโค้ดฟรี หลักสูตรโอเพนซอร์สของ freeCodeCamp ช่วยให้ผู้คนมากกว่า 40,000 คนได้งานเป็นนักพัฒนา เริ่มต้นได้เลย