Computer Science

CPU Function

The CPU (central processing unit) is the primary component of a computer that performs instructions and processes data. It carries out arithmetic, logic, and input/output operations as directed by the computer's software. The CPU's function is to execute program instructions and coordinate the activities of the computer's other hardware components.

Written by Perlego with AI-assistance

5 Key excerpts on "CPU Function"

  • Computer Architecture
    eBook - ePub

    Computer Architecture

    Fundamentals and Principles of Computer Design, Second Edition

    • Joseph D. Dumas II(Author)
    • 2016(Publication Date)
    • CRC Press
      (Publisher)
    chapter three

    Basics of the central processing unit

    The central processing unit (CPU) is the brain of any computer system based on the von Neumann (Princeton) or Harvard architectures introduced in Chapter 1 . Parallel machines have many such brains, but normally each of them is based on the same principles used to design the CPU in a uniprocessor (single CPU) system. A typical CPU has three major parts: the arithmetic/logic unit (ALU), which performs calculations; internal registers, which provide temporary storage for data to be used in calculations; and the control unit, which directs and sequences all operations of the ALU and registers as well as the rest of the machine. (A block diagram of a simple CPU is shown in Figure 3.1 .) The control unit that is responsible for carrying out the sequential execution of the stored program in memory is the hallmark of the von Neumann–type machine, using the registers and the arithmetic and logical circuits (together known as the datapath ) to do the work. The design of the control unit and datapath have a major impact on the performance of the processor and its suitability for various types of applications. CPU design is a critical component of overall system design. In this chapter, we look at important basic aspects of the design of a typical general-purpose processor; in the following chapter, we will go beyond the basics and look at modern techniques for improving CPU performance.

    3.1 The instruction set

    One of the most important features of any machine’s architectural design, yet one of the least appreciated by many computing professionals, is its instruction set architecture (ISA). The ISA determines how all software must be structured at the machine level. The hardware only knows how to execute machine language instructions, but because almost all software is now developed in high-level languages rather than assembly or machine language, many people pay little or no attention to what type of instruction set a machine supports or how it compares to those used in other machines. As long as the system will compile and run a C++ program or support a Java virtual machine, is its native machine language really all that important? If all you are concerned with is getting a given program to run, probably not. But if you are interested in making a system perform to the best of its abilities, then it behooves you to know what those abilities really are, and the only ability of a CPU that really matters is its ability to execute machine instructions. What those instructions are, what they do, and how they support your high-level task can have a great deal to do with how quickly and efficiently that task will be done. Thus, it is worthwhile to study the similarities and differences between ISAs in order to be able to pick the best system for a given application. We examine important features of computer ISAs in this section.
  • Computer Systems Architecture
    4 Central Processing Unit PART I: CENTRAL PROCESSING UNIT
    This chapter focuses on the various aspects of the processor (sometimes referred to as the central processing unit [CPU]). The processor is the core of the system, capable of executing the applications’ instructions and performing the required tasks.
    By relating to the general hardware architecture figure (Figure 4.1 ), we can see the exact location of the CPU.
    The processor, through its electronic circuits, is capable of “understanding” and executing the instruction in the program. As already mentioned (see the section in Chapter 1 on the Von Neumann architecture and the processor) and due to implementing a modular approach, each processor is divided into additional components such as the control unit (CU), the arithmetic and logic unit (ALU), a special and dedicated internal fast memory, and so on.
    •  The CU is responsible for scheduling the instructions to be executed, by bringing each instruction from memory, decoding it to find out its operands, fetching these required operands, and then transferring it to the ALU for execution.
    •  The ALU executes the instruction using their operands.
    •  Registers are one kind of fast temporary memory, inside the processor. There are several types of registers: some are available for the developers, others are only available for the operating system, and a third type is used solely by the hardware itself (for additional elaboration see “Attributes of the First Computers” in Chapter 1 ). It should be noted that as part of software abstraction, accessing registers is available only by using the assembly language. Most high-level programming languages do not provide this capability and using the registers is left for the compiler only.
    Registers
    The idea of using registers was borne from the need to increase the speed of computers. Since even in the early days of computers, there was a need to overcome the architectural built-in problem of the processor being significantly faster than the memory. For executing each instruction, the CU has to bring it and its operands from memory. This means that even the very fast processors will have to wait for the operands to be fetched from the relatively slow memory. Since most of the instructions use operands, the memory access became a significant limiting factor to speed. Over the years, various approaches were suggested to overcome this problem, such as read ahead, in which the CU reads the instruction that will be required in the near future (this will be elaborated as part of this chapter), or the introduction of cache memory (Chapter 6
  • Computer Architecture and Security
    eBook - ePub

    Computer Architecture and Security

    Fundamentals of Designing Secure Computer Systems

    • Shuangbao Paul Wang, Robert S. Ledley(Authors)
    • 2012(Publication Date)
    • Wiley
      (Publisher)
    Chapter 6 Central Processing Unit
    Central Processing Unit (CPU) is the brain of a computer system. A computer can be classified as a super computer, a mainframe computer, a minicomputer, a microcomputer, or a handheld computer. Each of the above mentioned computers may contain one or more processors. Usually enterprise computers (servers) contain more processors than personal computers. A CPU has a certain number of address, data, and control bus signals. The number of data bits that can be processed at one time is called a word. Unlike byte which is a fixed number equaled to 8 bits. The word size differs from computers to computers. For example, the word for a 32-bit computer is 32/8 = 4 bytes, while the word for a 64-bit computer is 64/8 = 8 bytes.

    6.1 The Instruction Set

    The instruction set provides an interface that allows users to make full use of the processor. The selection of the instructions is determined by the application for which the processor is intended. For example, a computational intensive computer may choose processors that are built with larger word size, more math functions and lots of memory management features. On the other hand, a processor designed for embedded systems such as TV remote controls and air conditioners may only contain less or simple instructions, small word size and easy addressing features.

    6.1.1 Instruction Classifications

    Instructions usually contain two components: operation code (opcode ) and operands . An instruction can have one opcode and zero or more operands. Some common instruction formats are shown in Figure 6.1
  • PCs Simplified
    eBook - ePub
    • Elaine Marmel(Author)
    • 2011(Publication Date)
    • Visual
      (Publisher)
    . These transistors contain components just .09 microns wide (an average human hair is 100 microns wide). The latest personal computer CPUs contain over 100 million transistors and can perform billions of instructions per second.
    What Is a Motherboard?
    A motherboard is the principal circuit board in your computer. It contains connectors for all of the other circuit boards — also called chips
    — that you attach to the computer. Every PC motherboard has a connector to hold the CPU chip as well as connectors to attach disk drives, memory, and circuit boards that enable you to connect your monitor, printer, and other devices to your computer.
    What Is the Function of a CPU?
    The purpose of the CPU is to coordinate the flow of data throughout the computer; this is why the CPU is often called the computer’s hardware brain. The CPU also performs math and logic calculations, sends data to and retrieves data from memory and storage devices, and processes hardware and software instructions.
    CPU Manufacturers
    The biggest manufacturer of CPUs is Intel, which makes the Core, Pentium, and Celeron processors for desktop PCs. The other major CPU maker is AMD, which manufactures the Phenom, Athlon, and Sempron chips for desktop PCs. Each family of processor chips by each manufacturer is intended to support different intensities of work on a computer.
    CPU Speed
    The most common measure of a CPU is its speed. The speed is measured in cycles per second (hertz, or Hz) where a cycle represents a single task performed by the CPU, such as adding two numbers. CPU speeds are usually measured in gigahertz (GHz), or billions of cycles per second.
    CPU Caches
    Many CPUs come with a feature called a cache
    , which is a storage area where the CPU keeps frequently used data. This feature saves the CPU from having to extract that data from some more distant location in the computer’s memory, thus improving computer performance. The latest CPUs have both a cache on the chip (usually called an L1 cache) and a cache between the chip and memory (usually called an L2 or L3 cache) for maximum performance.
  • Information Technology
    eBook - ePub

    Information Technology

    An Introduction for Today's Digital World

    2

    The CPU and Memory

    In this chapter, we begin to explore computer systems in detail. We examine the processing portion of the input, processing, output, and storage (IPOS) cycle. Processing involves both the processor and memory. The processor or central processing unit (CPU) executes (processes) program code. For efficiency, we store our program instructions and the data that the program operates on in memory. The CPU accesses memory continuously to execute the program. Unfortunately, our computers’ main memories, although large, tend to be slower than the processor and so to keep the processor running smoothly we provide computers with multiple memories of different sizes and speeds. These memories are collectively called the memory hierarchy. In this chapter, we explore both the CPU and the memory hierarchy and also introduce the pipeline to improve processor performance and ways to evaluate a computer’s performance. We conclude with an examination of the evolution of computer technology. The learning objectives of this chapter are to be able to:
    •  Explain the role of the central processing unit (CPU) •  Describe the components of the CPU in terms of their function, how they work, and what they communicate with •  Explain the use of the various buses •  Explain the types and roles of the various types of memory in the memory hierarchy •  Determine the efficiency of a computer based on the type and speed of CPU and type, size, and speed of the various components of the memory hierarchy •  Describe the evolution of computer technology and the impact of each type of technology

    2.1      AN OVERVIEW OF A COMPUTER SYSTEM

    Figure 2.1 illustrates the components of a typical computer system. We see three boxes that represent the main components of our computer: the CPU, memory, and input/output (I/O) system. Connecting these components together is a bus called the system bus. Each of these three components and the bus are all composed of lesser components. To understand the computer, we need to look at the CPU, memory, I/O, bus, and their component parts. In this section, we provide a brief overview defining the role of these four components. In Sections 2.2 and 2.3 , we explore the CPU in detail. We also look briefly at the bus in Section 2.2 . In Section 2.4 , we look at the various forms of computer memory and how these memories interact with each other and the CPU. Section 2.5 describes how we can make our computers more efficient along with ways of gauging efficiency. Section 2.6 concludes with a history of computer technology. We hold off discussing I/O devices until Chapter 3
Index pages curate the most relevant extracts from our library of academic textbooks. They’ve been created using an in-house natural language model (NLM), each adding context and meaning to key research topics.