Chapter02 Slides

# Chapter02 Slides - Chapter 2 Variables and Constants A...

This preview shows pages 1–12. Sign up to view the full content.

Opportunity Click to edit Master subtitle style Chapter 2: Variables and Constants A Place For Everything and Everything in its Place

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

View Full Document
You will learn how to… Describe binary data storage in computer memory Use an analogy to explain how values are stored in the computer Declare variables and constants of the appropriate size and type Create meaningful variable names using prescribed naming conventions
You will learn how to. .. Write assignment statements Use the appropriate mathematical symbols to do calculations and assign values Explain the general order of the code in computer programs Explain and use TextBoxes, Labels, and Buttons Perform a deskcheck

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

View Full Document
You will learn how to. .. Explain and use the symbols on a flowchart Interpret a flowchart and write a program based on a flowchart Create a flowchart to describe a programming problem
Variables and Constants Memory is everything to a computer Now the amount of memory isn’t an issue as much as the management of memory Variables and constant handle the data in a program Flowcharts and deskchecks are used for designing and testing programs

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

View Full Document
On or Off…That’s It All computer use binary for everything 0s and 1s only All data stored in binary All calculations done in binary Presence or absence of an electrical charge determines if it’s a 0 or 1
Bits and Bytes Bi nary digit is called a bit Bit - a single 0 or 1 Byte - a series of eight bits that can represent a single character of text or small numbers; when combined with other bytes it can represent larger numbers Two bytes can store numbers from -32,768 to 32,767 (216 possible numbers)

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

View Full Document
Letters and Other Characters Letters and other characters use the same principles A series of 0s and 1s represent a particular character 0100 0001 = 65 = A 0100 0010 = 66 = B 0101 1010 = 90 = Z 0111 1010 = 122 = z Check Appendix A (Page 631)
Binary Letter Codes ASCII - American Standard Code for Information Interchange The standard binary representation for letters, numbers and symbols Uses one byte per character (28 possible characters) Unicode – alternate standard that allows for languages with >255 characters Uses two bytes per character (216 possible characters) Uses twice as much storage space

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

View Full Document
So is it a letter or a number? How do we tell them apart? Using a data type Tells the computer what kind of data to expect Determined when a variable is declared 0100 0001 is both A and 65
Big Jars and Little Jars Think of variables (storage locations) as containers Containers come in different sizes and are designed for storing different types of items Each container can store only one item

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 48

Chapter02 Slides - Chapter 2 Variables and Constants A...

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

View Full Document
Ask a homework question - tutors are online