COMP-0011 Lecture Notes - Lecture 4: Bracket, Boolean Expression, Kilobyte
Document Summary
{ } are control blocks b. i: c++ doesn t care about whitespace. Only looks for ; at the end of a statement b. Control block: group of statements the compiler treats as one compound statement. You want to line up curly braces with the matching curly braces b. ii. b. iii. b. iii. 1. b. iii. 2: compound conditionals. Further nested the curly brace the further tabbed it is: boolean expression evaluates to true or false, boolean expressions can be combined b. i. b. ii. b. iii. != means not: result of combo must be true or false c. i. False wafwetrue true: binary numbers, bit means binary digit a. i. a. ii. Takes on a 0 or 1: byte is 8 bits. Memory is byte addressable b. iii. b. iv. b. v. megabyte is 1 million bytes b. vi. b. vii. b. viii. b. ix. b. x. Exabyte is 1,000 petabyte (www in 2009 was 500eb) Zettabyte is 1,000 exabyte (all human speech is 42 zb: translating from binary to decimal and vice versa c. i.