Chapter02 Slides

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

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

View Full Document Right Arrow Icon
Opportunity Click to edit Master subtitle style Chapter 2: Variables and Constants A Place For Everything and Everything in its Place
Background image of page 1

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

View Full Document Right Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full Document Right Arrow Icon
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
Background image of page 4
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
Background image of page 5

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

View Full Document Right Arrow Icon
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
Background image of page 6
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)
Background image of page 7

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

View Full Document Right Arrow Icon
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)
Background image of page 8
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
Background image of page 9

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

View Full Document Right Arrow Icon
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
Background image of page 10
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
Background image of page 11

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

View Full Document Right Arrow Icon
Image of page 12
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 Right Arrow Icon
Ask a homework question - tutors are online