CPSC 259 Chapter Notes - Chapter 7.4: Ampersand

54 views2 pages

Document Summary

In a computer"s ram, you can store information but each place for storing information has an address. Information is stored in its basic form in bits, which can store a 0 or a 1. So if you have 3 bits, then you can store up to 2^3 = 8 integers from 0 to 8. Storing the number 0 would mean turning all three bits off. Storing the number 3 would mean doing 011, first two on, last off. Hence, when you declare a variable, such as int a; then a is given some part of the memory, that is it is given control of a few switches, few bits that it can use to store its value. A becomes the embodiment of the information and to call a means retrieving the information. An integer, such as a, is given 4 bytes, or 32 bits.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents