Written Assignment 1
Written Assignment 1 covers a few topics within the first two chapters of the text. The topics related to this written assignment 1 are CPU, fetch-and-execute- cycle, High-level languages and machine languages, the importance of Java, and platform-independent language. The first question asks “What is a CPU and what role does it play in a computer?” The CPU is an acronym for Central Processing Unit. The CPU works in conjunction with the Main memory of a computer to execute programs on at a time. A CPU is not directly used by the user and would not work without supporting devices which are called peripherals. The Central Processing Unit made up of three components which are the control unit, the registers, and the arithmetic/logic units. The control unit acts as a middle man between the main memory and the registers by transferring data and instructions. Along with that the control unit directs the data storage in particular registers to be done by the arithmetic/logic unit. The next component is the register’s serve as small storage areas with specific purposes, an examples is an instruction register which holds the current instruction being executed (Lewis &Loftus, 2013). The arithmetic/ Logic unit is in charge of making decisions and performing calculations. The next question asks “What is meant by the fetch- and execute cycle?” According to the text it is actually called the “fetch-decode-execute cycle.” It serves as one of the main functions of the CPU. This process starts with and instruction being “fetched” from the main memory at a specific address that is stored in the program counter, which it is then put into the instruction register ( Lewis & Loftus, 2013). This instruction goes to the next phase which is where it gets decoded and a specific operation is then completed. The control unit then executes the instruction by activation of the proper circuitry. The third question asks to explain the difference between High-level languages and machine languages. A high-level language is conveyed in English phrases or simply letters. High-level languages are easier to read and write. Machine language is translated in binary digits and is harder for users to understand it, let alone read and write it. While High-level language is short and to the point, machine language is long and unreadable. Something important to point out is that in order for high-level language to work the code must be translated into machine language. The next question asks “What are some things that have made java so popular?” The popularity of Java has grown over the years due in part with easy to use ways. Its core and fundamentals came from C++, but users found that hard to use. Java developers made a simpler version for programming that developers could use. Along with its high security, Java is also object oriented which basically means it focus is on objects before anything else. Java has grown very popular with the internet because it gives developers the opportunity to make animated webpages, making the internet more interactive. The last question asks what the meaning of platform-independent language is. A platform- independent language refers to not having any restriction when carrying out programs imposed by the operating system as they would normally do with platform dependent languages. Java falls under the category of a platform-independent language because Java source code in translated to java bytecode by the compiler. The Java virtual machine reads the bytecode and executes the program. Java bytecode isn’t attached to a specific processor making it accessible to many different computers as long as there is Java interpreter or a bytecode compiler.
Lewis, J., & Loftus, W. (2013). Java software solutions, foundations of program design. Addison-Wesley.