ENGR 101 Lecture Notes - Lecture 17: Nibble, Operand

117 views2 pages
31 Mar 2015
School
Department
Course

Document Summary

Engr 101: introduction to computers and algorithms - lecture 17: data representation and binary math. If you want a variable to never change in the context of the code you can define it to be a const. Does not replace the type, but rather modifies the data type. You can make identifiers have global scope. This is risky for non-constant identifiers, since they can change function without explicitly being passed in. Coercion: the implicit (automatic) conversion of a value from one data type to another. May apply when: evaluating a mixed-type expression. More restricted operand is promoted to type of other. Passing a value to a function/ returning a value from a function. Casting: the explicit conversion of a value from one data type to another. Explicit cast often recommended for clarity, even when coercion would apply. All data inside the computer is represented by bits. Bits can have only two values 0 or 1.

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