COMP 280 Study Guide - Quiz Guide: Binary Number
50 views4 pages
19 Oct 2017
School
Department
Course
Professor
Document Summary
1. use pointer arithmetic to access memory to which you have a pointer. 2. compare the semantics of the + operator when applied to a pointer with the semantics when applied to integers. 3. write a c function that can modify a variable in its caller. void swap (int *a, int *b) int tmp = *a; 128: convert between the binary and decimal representations of a number. 4: describe how adding a 0 to the left or right of a binary number changes its value. Adding a 0 to the left of a binary number does not change its value because you are essentially adding 0*10^n. but adding a 0 to the right increases the binary number by a factor of 10. Lecture 07: convert between binary, hexadecimal, and decimal representation. 0x5a 10*16^0 + 5*16^1 = 9010. 36: perform addition of two binary numbers. 0: describe how overflow can result in an incorrect answer when performing addition of binary numbers.