PHYS 2411
COMPUTATIONAL SCIENCE I

Fall Semester, 1998

Instructor: Joel E. Tohline
tohline@rouge.phys.lsu.edu

Character and Integer Definitions in Binary and HEX
Page last updated:

The Java "byte" data type [8-bit, signed two's complement integers]
ASCII characters
The Java "float" data type


Practice Problems

What is the largest negative integer and largest positive integer that can be represented by a "short" (or "int" or "long") Java data type?
Louisiana automobile license plates have six "digits" composed such that the left-most three digits are letters of the alphabet (A-Z) and the right-most three digits are numbers (0-9). For example, [AHH 309]. What is the largest number of license plates that can be produced if you demand that they have unique 6-digit identifications?
What Java byte integer is represented by the 8-bit binary sequence 0001 0110 ? What about the sequence, 1110 1010 ? What is the hexadecimal representation of both of these [Java byte] integers?
What 8-bit binary sequence represents the [Java byte] integer -128 ? What binary sequence represents the integer +127 ? Add these two binary sequences together and examine whether or not the answer is the correct 8-bit binary sequence representation of the [Java byte] integer -1 .
What 8-bit binary sequence represents the [Java byte] integer -22 ? What binary sequence represents the integer +26 ? Add these two binary sequences together and examine whether or not the answer is the correct 8-bit binary sequence representation of the [Java byte] integer +4 .


| Syllabus | Textbooks |
| Calendar | Q1 | Q2 | Q3 | Q4 |