Java Reference
In-Depth Information
1.8 Important Points
1. A computer consists of hardware and software. While the software can be easily
changed by a programmer, the hardware of the computer can only be physically
2. There are two types of software: application software and operating systems software.
The operating system helps the application software communicate with the hardware.
It also allows the application software to run smoothly by providing features, such as
concurrent program execution and graphical user interface.
3. There are two ways to execute a program: using a compiler and using an interpreter.
A compiler translates the program into executable code that can be later executed by
the CPU. An interpreter, on the other hand, both translates and executes the program
in real time. Since an interpreter needs to perform the additional task of translating
the code, running a program using an interpreter is usually slower.
1.9 Exercises
1. Explain how a Java program is executed.
2. Convert the number 1353 to an 8-bit binary number. Next, convert the number to a
hexadecimal number.
3. Convert the binary number 10101001 to decimal.
4. Convert the hexadecimal number 2FA3 to decimal.
5. What is your favorite historical computer game?
Search WWH ::

Custom Search