Math107Ch2 - Introduction To Scientific Programming Chapter...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction To Scientific Programming Chapter 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
S.Horton/107/Ch. 2 Slide 2 Chapter 2 I. Computer Storage I. I. Strings – Part I I. I. Software Development A. Defining Projects B. Setting up your own programming environment
Background image of page 2
S.Horton/107/Ch. 2 Slide 3 I. How A Computer Stores Information Everything on a computer is fundamentally stored as a one or a zero (irreducible state): Two state transistor (on/off) in silicon memory Magnetic pole orientation (up/down) in hard drive Reflection (pit/valley) in optical storage This single piece of binary (or digital) information is called a “bit”. Each storage location has an address and a value .
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
S.Horton/107/Ch. 2 Slide 4 Computer Storage (cont.) By convention, data is moved through the CPU in groups of 2, 8, 16, 32, or now 64 (powers of 2). The basic addressable unit is 8 bits = 1 “byte”. Today, storage is quoted in KB, MB, GB, or TB!
Background image of page 4
S.Horton/107/Ch. 2 Slide 5 Computer Numbering Systems You are probably most familiar with the decimal numbering system – i.e. (0-9) per digit. This is called a Base 10 system. This is only one of many possible “bases”. Binary numbering is Base 2 (0-1). The other important numbering system used extensively on computers, is Base 16, called hexadecimal (0-9,A-F).
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
S.Horton/107/Ch. 2 Slide 6 Basic Number Types In a program, you must declare a type for your data. The basic types are: int and long for integer numbers float and double for real numbers
Background image of page 6
S.Horton/107/Ch. 2 Slide 7 Java Declaration Examples Syntax: Type Variable_1, Variable_2, … ; Examples: int count; long i; float total; double marketValue; Variants include: int count = 0; long i = 1000L; float total = 1.0F; double marketValue = 1234.56D, interestRate = 5.75D;
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
S.Horton/107/Ch. 2 Slide 8 Character Representation The most common standard for character reference is known as ASCII which uses 8 bits to reference all individual characters. How many possibilities are there? A newer extended character set is known as Unicode
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 28

Math107Ch2 - Introduction To Scientific Programming Chapter...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online