Java Reference
In-Depth Information
TABLE 1 . 2 : Hexadecimal digits.
( Hexadecimal digit ) Decimal number ) Binary number )
0
0
0000
1
1
0001
2
2
0010
3
3
0011
4
4
0100
5
5
0101
6
6
0110
7
7
0111
8
8
1000
9
9
1001
A
10
1010
B
11
1011
C
12
1100
D
13
1101
E
14
1110
F
15
1111
is the reason why Java programs can run slower than programs that are directly compiled,
such as programs written in the C programming language. Alternatively, the Java Virtual
Machine may be physically coded as part of the CPU. For example, some cell phones have
CPUs that can execute Java binary code.
There are two general types of software: operating system software and application soft-
ware . Operating systems software provides the interface between the hardware of the com-
puter and the application software. For example, the operating system of a computer allows
programs to access input and output devices, such as the keyboard, the hard disk, the
mouse, and the monitor. Most modern operating systems also provide Graphical User In-
terface (GUI) to the system. A different responsibility of the operating system is to allow
programs to execute concurrently and share resources, such as the main memory and the
hard disk. The application software in a computer is made up of the programs that are run
by the end users. These include games, oce software, and web browsers.
1.5 Type of Programming Languages
Computer software can be written using different programming languages. A program-
ming language of first generation is machine code. To put it differently, this is a sequence
of zeros and ones that the computer can understand. Such code can be represented, for
example, in hexadecimal notation. A typical example of a machine instruction is to read
data that is stored in a location of main memory. The problem with machine code is that
it is low level and it is dicult for humans to interpret. A second-generation programming
language is referred to as Assembly language . Now the instructions are written using En-
glish words (e.g., add , sub , move , etc.). There is a straightforward mapping between code
written in an Assembly language and machine code. The disadvantage of Assembly is that
it is a very low level language and writing Assembly code is di cult. A third-generation
programming language provides high-level access to the data. Examples of third-generation
programming languages include C, C++, and Java. An advantage of using a high-level
programming language is that the programmer does not need to deal with physical main
 
Search WWH ::




Custom Search