Prev | Current Page 242 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

12 Write a Java program that iterates through the integers from 1 to 20, computing the square of each
number and writing the information to a file called squares.txt. Use a PrintWriter to write the
file of the first 20 integers and their squares. Arrange for two columns with a line of column headings at
the top. You will find this easy to do using the println() method of the PrintWriter.
94 PROGRAMMING IN JAVA [CHAP. 5
CHAPTER 6
Operating Systems
CAPABILITIES OF THE HARDWARE
???It ain??™t nuthin??™ but aarn,??? one of my (Reynolds) instructors at Hewlett Packard used to say. He was big man
from Georgia with a strong accent, and by ???aarn??? he meant iron. The computing machinery itself, without any
operating system, is as useful to the average person as a chunk of iron. Maybe it is less useful, for a sufficiently
large piece of iron could at least serve as a boat mooring.
The precise list of things a particular computer can do directly is very short. The list is the ???instruction set???
of the computer. Modern computers have instruction sets of about 70 to 150 instructions.
The instructions the machine understands allow the machine to move bits from one memory location
to another, or to move bits to/from memory from/to a register, or to shift the bits in a computer ???word??? (most
computers today regard 32 bits as a ???word???) some number of positions left or right, or to compare the values of
two words, or to complement the bit values of a word (change the ones to zeros, and vice versa), or to add two
values.


Pages:
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
need cash fast bad credit perfumy fm świnoujście noclegi upadlanych.waw.pl Dubaj