CSE 20 Lecture 4: Number System and Boolean Function
Next Weeks Next week we will do Unit:NT, Section 1. There will be an assignment set posted today. It is just for practice.
Boolean Functions and Number System
Boolean Functions and Number System Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Boolean Functions and Number System Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 What does 217 read like?
Boolean Functions and Number System Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 What does 217 read like? Usually we represent our number in decimal representation. Like: 217 = 2 10 2 + 1 10 + 7
Numbers with base b Usually we represent our number in decimal representation. Like: 217 = 2 10 2 + 1 10 + 7
Numbers with base b Usually we represent our number in decimal representation. Like: 217 = 2 10 2 + 1 10 + 7 One can represent a number is any base.
Numbers with base b Usually we represent our number in decimal representation. Like: 217 = 2 10 2 + 1 10 + 7 One can represent a number is any base. Like: 217 = 2 3 4 + 2 3 3 + 0 3 2 + 0 3 + 1
Numbers with base b Usually we represent our number in decimal representation. Like: 217 = 2 10 2 + 1 10 + 7 One can represent a number is any base. Like: 217 = 2 3 4 + 2 3 3 + 0 3 2 + 0 3 + 1 Thus 217 = [22001] 3.
Numbers with base b Usually we represent our number in decimal representation. Like: 217 = 2 10 2 + 1 10 + 7 One can represent a number is any base. Like: 217 = 2 3 4 + 2 3 3 + 0 3 2 + 0 3 + 1 Thus 217 = [22001] 3. One can represent a number in any base.
Base b representation
Base b representation Digits: 0, 1,..., b 1
Base b representation Digits: 0, 1,..., b 1 Represented as [x] b. (Like [22001] 3 )
Base b representation Digits: 0, 1,..., b 1 Represented as [x] b. (Like [22001] 3 ) Base b representation of a number x is the unique way of writing x = x 0 b 0 + x 1 b 1 + + x k b k, where x 0, x 1,..., x k {0, 1,..., (b 1)}
Base b representation Digits: 0, 1,..., b 1 Represented as [x] b. (Like [22001] 3 ) Base b representation of a number x is the unique way of writing x = x 0 b 0 + x 1 b 1 + + x k b k, where x 0, x 1,..., x k {0, 1,..., (b 1)} So, x = [x k x k 1... x 1 x 0 ] b
Questions 1 Why and how can any integer be written in any base?
Questions 1 Why and how can any integer be written in any base? Given an method or algorithm to find the representation given x and b.
Questions 1 Why and how can any integer be written in any base? Given an method or algorithm to find the representation given x and b. 2 Why does an integer has an unique representation in a base b?
Questions 1 Why and how can any integer be written in any base? Given an method or algorithm to find the representation given x and b. 2 Why does an integer has an unique representation in a base b? If an algorithm A 1 write x = [x k x k 1... x 0 ] b and another algorithm A 2 write x = [y k y k 1... y 0 ] b, then is the two representations same.
Questions 1 Why and how can any integer be written in any base? Given an method or algorithm to find the representation given x and b. 2 Why does an integer has an unique representation in a base b? If an algorithm A 1 write x = [x k x k 1... x 0 ] b and another algorithm A 2 write x = [y k y k 1... y 0 ] b, then is the two representations same. In other words, is y i = x i for all 0 i k?
iclicker question What is the representation of 6102 in binary?
iclicker question What is the representation of 6102 in binary? 1 [1011111011100] 2 2 [20110200011] 2 3 [111111111111] 2 4 [1011111011110] 2
iclicker question What is the sum of [24887] 9 and [13808] 9?
iclicker question What is the sum of [24887] 9 and [13808] 9? 1 [38806] 9 2 [38695] 9 3 [38696] 9 4 [38886] 9
Addition is base b representation
Addition is base b representation Add as numbers and represent in the base b representation.
Addition is base b representation Add as numbers and represent in the base b representation. For example: In base 3 [2] 3 + [1] 3 = [10] 3
Addition is base b representation Add as numbers and represent in the base b representation. For example: In base 3 [2] 3 + [1] 3 = [10] 3 [11] 3 + [12] 3 = [100] 3
Addition is base b representation Add as numbers and represent in the base b representation. For example: In base 3 [2] 3 + [1] 3 = [10] 3 [11] 3 + [12] 3 = [100] 3 [121] 3 + [22] 3 = [220] 3
iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b)
iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 < 2 10 2 2 10 3 Depends on the values of a and b 4 Can t Say
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b)
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256.
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256. So 2 a + b 512
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256. So 2 a + b 512 (2 9 a) + (2 9 b) = (2 9 + 2 9 ) (a + b)
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256. So 2 a + b 512 (2 9 a) + (2 9 b) = (2 9 + 2 9 ) (a + b) = 2 10 (a + b)
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256. So 2 a + b 512 (2 9 a) + (2 9 b) = (2 9 + 2 9 ) (a + b) = 2 10 (a + b) Since (a + b) > 0
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256. So 2 a + b 512 (2 9 a) + (2 9 b) = (2 9 + 2 9 ) (a + b) = 2 10 (a + b) Since (a + b) > 0 and so (2 9 a) + (2 9 b) = 2 10 (a + b) < 2 10
iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b)
iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 2 9 2 2 9 3 > 2 9 4 Depends on the values of a and b
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b)
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256.
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256. So 2 a + b 512
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256. So 2 a + b 512 (2 9 a) + (2 9 b) = 2 9 + (2 9 (a + b))
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256. So 2 a + b 512 (2 9 a) + (2 9 b) = 2 9 + (2 9 (a + b)) Since (a + b) 512 so 2 9 (a + b) 0
Proof of iclicker question If a and b are integers in the range 1 and 256 then is (2 9 a) + (2 9 b) 1 a 256 and 1 b 256. So 2 a + b 512 (2 9 a) + (2 9 b) = 2 9 + (2 9 (a + b)) Since (a + b) 512 so 2 9 (a + b) 0 and so (2 9 a) + (2 9 b) 2 9