\$Id: review1.txt,v 1.1 2006/02/03 00:52:12 locasto Exp \$ Spring 2006 COMS 1001 ---------------------------------------------------------------------- 0. Translate the following numbers from binary (base 2) to decimal (base 10). a) 10011001 b) 00000001 c) 10000000 d) 11011010 e) 00000000010110110000000111110111 answers: a) 153 b) 1 c) 128 d) 218 e) 5964279 1. Translate the following numbers from decimal to binary. a) 1,024 b) 554 c) 4,342,119 d) 4490 e) 2048 f) 4096 g) 11223 answers: a) 10000000000 b) 1000101010 c) 10000100100000101100111 d) 1000110001010 e) 100000000000 f) 1000000000000 g) 10101111010111 2. Add these binary numbers. a) 10010000 + 00110111 b) 0000 + 1111 c) 01 + 01 d) 1000 + 0010 answers: a) 11000111 b) 1111 c) 10 d) 1010 3. Show the truth table for the following expressions: a) p AND q b) p OR q c) NOT p d) p AND q OR q e) (q IMPLIES p) AND (q OR p) f) p AND q AND r g) (p OR q) IMPLIES r answers: a) p| q| p AND q| b) p| q| p OR q| -------------- ------------- T T T T T T T F F T F T F T F F T T F F F F F F c) p !p d) p q p AND q OR q ----- ------------------ T F T T T F T T F F F T T F F F e) p q q->p AND q OR p ---------------------- T T T T F T F T F F F F f) p q r p and q and r |g) p or q -> r ---------------------------------------- T T T T T T T F F F T F T F T T F F F F F T T F T F T F F F F F T F T F F F F T 4. Draw the circuits (using AND, NOT, and OR gates) for the following expressions: a) a OR b AND c OR d b) a AND b OR (NOT c OR NOT d) answers: a) a ---\---\ > >------------+----\ b ---/---/ | | | )------ c ---\---\ | | > >------------+----/ d ---/---/ b) a ---+--| | )------------\------\ b ---+--| \ \ > >---- c ---+--| / / | )------------/------/ d ---+--| 5. What is a computer? A computer is a device for receiving, storing, and processing information. A digital computer uses a composition of electronic circuits to process information.