How does cpu work
Some families of CPUs, such as the ones used in desktop PCs, use the same instruction set, allowing them to run the same software. CPUs outside a product family may use different instructions; an iPad's CPU, for example, has different instructions than one running a Windows-based laptop. Processors have a circuit called the arithmetic and logic unit that carries out calculations and comparisons.
The arithmetic most CPUs perform is basic multiplication, addition, division and subtraction; complex math such as statistical functions are combinations of many simple operations performed at high speed.
The ALU also performs logical comparisons between two data items to determine if they are equal or if one is of greater value than the other. The CPU contains a control unit that coordinates activities among the processor's other working parts. The control unit breaks each instruction down into a set of actions and directs the CPU's various subsystems to carry out the actions.
For example, the control unit could direct the ALU to multiply two numbers together and then add a third number to the result. The CPU chip has a limited amount of very fast memory. It has a set of storage areas called registers upon which the ALU acts directly. For example, the ALU can add the number in register 2 to the contents of register 1 quickly. The CPU also keeps recently-used instructions and data in an area called a cache that improves the computer's efficiency.
Its main job is to perform arithmetic and logical operations and orchestrate the instructions together. It tells what to do. According to the instruction, it helps activate the wires connecting CPU to different other parts of computer including the ALU. Control unit is the first component of CPU to receive the instruction for processing.
Hardwired CU are faster in processing instruction whereas microprogrammable as more flexible. Arithmetic and logical unit ALU as name suggest does all the arithmetic and logical computations. ALU performs the operations like addition, subtraction. ALU consists of logic circuitry or logic gates which performs these operations. Bellow is an example of half adder circuit which takes in two inputs and outputs the result. Here A and B are the input, S is the output and C is the carry.
Main job of CPU is to execute the instructions provided to it. To process these instructions most of the time, it needs data. Some data are intermediate data, some of them are inputs and other is the output. These data along with the instructions are stored in the following storage:. Register is a small set of place where the data can be stored.
A register is a combination of latches. Latches also known as flip-flops are combinations of logic gates which stores 1 bit of information. A latch has two input wire, write and input wire and one output wire. We can enable the write wire to make changes to the stored data.
When the write wire is disabled the output always remains the same. CPU has registers to store the data of output. Sending to main memory RAM would be slow as it is the intermediate data.
This data is send to other register which is connected by a BUS. A register can store instruction, output data, storage address or any kind of data. Ram is a collection of register arranged and compact together in an optimized way so that it can store a higher number of data. Instruction is the granular level computation a computer can perform. There are various types of instruction a CPU can process.
Instruction are provided to computer using assembly language or are generated by compiler or are interpreted in some high level languages. Best Portable Monitors.
Best Gaming Keyboards. Best Drones. Best 4K TVs. Best iPhone 13 Cases. Best Tech Gifts for Kids Aged Awesome PC Accessories. Best Linux Laptops. Best Bluetooth Trackers. Best eReaders.
Best Gaming Monitors. Best Android Phones. Browse All News Articles. Prey Predator Prequel Hulu. Window 11 SE Downgrade. Disney Plu TikTok. Windows 11 Default Browser Block. Teams in Windows 11 Taskbar. Smart TVs Ads. Team Comes to Workplace by Meta. Block People Spotify. Verizon Selling PS5. Windows 11 SE Explained. Find Downloaded Files on an iPhone. Use Your iPhone as a Webcam.
Hide Private Photos on iPhone. Take Screenshot by Tapping Back of iPhone. Should You Upgrade to Windows 11? Browse All Windows Articles. Copy and Paste Between Android and Windows. Protect Windows 10 From Internet Explorer. Mozilla Fights Double Standard. Connect to a Hidden Wi-Fi Network. Change the Size of the Touch Keyboard. Check Bluetooth Device Battery Life. Reader Favorites Take Screenshot on Windows. Mount an ISO image in Windows.
Boot Into Safe Mode. Disable Startup Programs in Windows.
0コメント