CMSC250 Spring 2004 Homework 3 Due Wednesday February 18 at the beginning of your discussion section You must write the solutions to the problems single sided on your own lined paper with all sheets stapled together and with all answers written in sequential order or you will lose points 1 Consider a digital logic circuit that works as follows There are three inputs P Q and R The output is Q s value if P is 0 and R s value if P is 1 In other words P selects which input Q or R to output a Write a logical expression that corresponds to this circuit b Draw the diagram for this circuit using any combination of 2 input AND gates 2 input OR gates and 1 input NOT gates Note 1 A 2 input AND gate simply means that the AND gates has two lines coming into it It does not mean that you may only use two of these gates in your circuit you may use any number of each type of gate Note 2 Please label each gate in your circuit diagram to assist us in grading your work c Write a logical expression that is equivalent to your expression from part a but without using any OR gates d Draw the circuit diagram corresponding to your expression in part c 2 Perform the following conversions and calculations Binary numbers are represented in 8 bit 2 s complement Showing your work will assist us in awarding partial credit a 10110110 10 b BC49A16 8 c 14716 10 d 10001011 00011111 2 e 00111001 00011101 2 3 You ve learned techniques for converting numbers between the binary octal and hexadecimal number systems A quick review from textbook pages 72 73 To convert an integer from hexadecimal to binary write each hexadecimal digit of the integer in fixed 4 bit binary notation Combine the resulting bits end to end To convert an integer from binary to hexadecimal group the bits into sets of four starting from the right and adding leading zeros as needed Convert the binary numbers in each set of four into hexadecimal digits and string all the digits together 1 The procedures for octal are identical but instead of making groups of four bits make groups of three bits In the future astronauts land on the planet Quatrella in a far away galaxy The inhabitants of Quatrella use a base 4 number system a The decimal system uses the digits 0 9 What are the digits in the base 4 system b How would you modify the conversion procedures above to convert integers in binary to and from the base 4 system c To prepare for future encounters in outer space the astronauts would like to know how to convert binary integers to and from any base that is a power of two that is any base in the form 2n for some integer n 2 Describe procedures to accomplish this 4 In each part below you are given a statement a domain and one or more predicates Translate the statement into symbolic logic using only those predicates and sets defined in that part a All cows eat grass Domain C cows Predicates G x x eats grass b All cows eat grass Domain U universal set Predicates G x x eats grass W x x is a cow c Some teachers are also students Domain T teachers Predicates S x x is a student d Some teachers are also students Domain U universal set Predicates S x x is a student R x x is a teacher 5 Let P x and Q x be predicates and D be the domain of x Justify each of your answers in English a Are x D P x Q x and x D P x x D Q x equivalent statements b Are x D P x Q x and x D P x x D Q x equivalent statements 6 Let E i j mean person i enjoys sport j and let P people and S sports For each of the following statements re write each one formally using symbolic logic a b c d Everyone has some sport that they enjoy There is someone who doesn t enjoy any sports Every sport is enjoyed by someone possibly a different someone for each sport There is a sport that nobody enjoys 7 Define a predicate K r s to satisfy these conditions m Z n Z K m n is true but n Z m Z K m n is false You do not need to justify your answer 2
View Full Document
Unlocking...