หน่วยประมวลผลกลาง


สมองคอมพิวเตอร์

หน่วยประมวลผลกลาง (อังกฤษ: central processing unit) หรือย่อว่า ซีพียู (CPU) เป็นวงจรอิเลคทรอนิกส์ที่ทำงาน หรือประมวลผล ตามชุดของคำสั่งเครื่องจากซอฟต์แวร์ คำนี้เริ่มใช้ในอุตสาหกรรมคอมพิวเตอร์ตั้งแต่ต้นศตวรรษ 1960s

หน่วยประมวลผลเปรียบเสมือนเป็นสมองของคอมพิวเตอร์ ในการทำหน้าที่ตัดสินใจหรือคำนวณ จากคำสั่งที่ได้รับมา เช่น การเปรียบเทียบ การกระทำการทางคณิตศาสตร์ ฯลฯ

โดยมีกระบวนการพื้นฐานคือ

  • อ่านชุดคำสั่ง (fetch)
  • ตีความชุดคำสั่ง (decode)
  • ประมวลผลชุดคำสั่ง (execute)
  • อ่านข้อมูลจากหน่วยความจำ (memory)
  • เขียนข้อมูล/ส่งผลการประมวลกลับ (write back)

สถาปัตยกรรมของหน่วยประมวลผลกลาง ประกอบไปด้วย ส่วนควบคุมการประมวลผล (control unit) และ ส่วนประมวลผล (execution unit) และจะเก็บข้อมูลระหว่างการคำนวณ ไว้ในระบบเรจิสเตอร์

การทำงานของหน่วยประมวลผลกลาง

 
การทำงานของหน่วยประมวลผลกลางแบบพื้นฐาน

การทำงานของหน่วยประมวลผลกลางแบ่งออกตามหน้าที่ได้เป็นห้ากลุ่มใหญ่ๆ ดังนี้ โดยทำงานทีละคำสั่ง จากคำสั่งที่เรียงลำดับกันไว้ตอนที่เขียนโปรแกรม

  • Fetch - การอ่านชุดคำสั่งขึ้นมา 1 คำสั่งจากโปรแกรม ในรูปของระหัสเลขฐานสอง (Binary Code from on-off of BIT)
  • Decode - การตีความ 1 คำสั่งนั้นด้วยวงจรถอดรหัส (Decoder circuit) ตามจำนวนหลัก (BIT) ว่ารหัสนี้จะให้วงจรอื่นใดทำงานด้วยข้อมูลที่ใด
  • Execute - การทำงานตาม 1 คำสั่งนั้น คือ วงจรใดในไมโครโปรเซสเซอร์ทำงาน เช่น วงจรบวก วงจรลบ วงจรเปรียบเทียบ วงจรย้ายข้อมูล ฯลฯ
  • Memory - การติดต่อกับหน่วยความจำ การใช้ข้อมูที่อยู่ในหน่วยจำชั่วคราว (RAM, Register) มาใช้ในคำสั่งนั้นโดยอ้างที่อยู่ (Address)
  • Write Back - การเขียนข้อมูลกลับ โดยมีหน่วยจำ Register ช่วยเก็บที่อยู่ของคำสั่งต่อไป ภายหลังมีคำสั่งกระโดดบวกลบที่อยู่
 
 
 
An Intel 80486DX2 CPU from above
 
An Intel 80486DX2 from below

The central processing unit (CPU) is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in use in the computer industry at least since the early 1960s.[1] The form, design and implementation of CPUs have changed dramatically since the earliest examples, but their fundamental operation remains much the same.

On large machines, CPUs require one or more printed circuit boards. On personal computers and small workstations, the CPU is housed in a single silicon chipcalled a microprocessor. Since the 1970s the microprocessor class of CPUs has almost completely overtaken all other CPU implementations. Modern CPUs are large scale integrated circuits in packages typically less than four centimeters square, with hundreds of connecting pins.

Two typical components of a CPU are the arithmetic logic unit (ALU), which performs arithmetic and logical operations, and the control unit (CU), which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary.

Not all computational systems rely on a central processing unit. An array processor or vector processor has multiple parallel computing elements, with no one unit considered the "center". In the distributed computing model, problems are solved by a distributed interconnected set of processors.


คำสำคัญ (Tags): #cpu
หมายเลขบันทึก: 476124เขียนเมื่อ 24 มกราคม 2012 19:06 น. ()แก้ไขเมื่อ 15 เมษายน 2012 03:34 น. ()สัญญาอนุญาต: ครีเอทีฟคอมมอนส์แบบ แสดงที่มา-ไม่ใช้เพื่อการค้า-อนุญาตแบบเดียวกันจำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (7)

อยากมีสมองเหมือนคอมพิวเตอร์จังจะได้จัดเก็บข้อมูลได้เยอะๆ

^______^"

เนื้อหาเข้าใจมากเลยค่ะ มีความรู้เพิ่มเติมเยอะเลยค่ะ

ถ้ามีความจำแบบคอมพิวเตอร์ก็คงดี

อยากมีความจำดีๆๆอย่างคอมอ่ะ

อยากมีความจำดีๆๆอย่างคอมจัง

พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท