Name: ______________________________________ Username: _________________________________ Homework #2 (100 pts) Submit hard copy to me YOU MUST SHOW ALL WORK FOR CREDIT!! Circle your final answer. For #8, submit Logisim circuit (.circ) to Blackboard 1) Represent decimal number 237 as: a. 8-‐bit, unsigned binary (5 pts) b. hexadecimal (5 pts) 2) Given the unsigned binary sequence 1010 0101, a. what is the decimal equivalent? (5 pts) b. what is the hexadecimal representation? (5 pts) 3) Given the hexadecimal number 0x7F, a. what is the unsigned binary equivalent? (5 pts) b. what is the decimal number? (5 pts) Date: __________________ CS 271 Name: ______________________________________ Username: _________________________________ Date: __________________ CS 271 4) Represent decimal number 27891 in: a. 16-‐bit, unsigned binary (5 pts) b. hexadecimal (5 pts) 5) Represent decimal number -‐47 as a 2’s complement, 8-‐bit binary sequence (10 pts) 6) Compute the following: a. (5 pts) 0011 1000 + 0110 0110 b. (5 pts) 0111 1111 -‐ 0100 1001 Name: ______________________________________ Username: _________________________________ Date: __________________ CS 271 7) Compute the following (binary numbers represented using 2’s complement): a. (5 pts) 1001 1100 -‐ 1110 0111 b. (5 pts) 1111 0010 -‐ 0001 0001 8) Using Logisim software, create a 2-‐bit adder circuit using only 2-‐pin logic gates, probes, and LEDs. (30 pts) a. The 2-‐bit adder must be capable of adding any two 2-‐bit numbers A and B. b. c. d. e. A1A0 + B1B0 S1S0 i. AN is the Nth placeholder for 2-‐bit binary number, input A. ii. BN is the Nth placeholder for 2-‐bit binary number, input B. iii. SN is the Nth placeholder for 2-‐bit binary number, addition output S. Must use Logisim’s “probe” as input (one probe per input bit) i. Label the input bits (A0, A1, B0, B1). Must use Logisim’s “LED” as output (one LED per output bit) i. Label the output bits (S0, S1). ii. Optional: include an “overflow” output bit (O). Save your circuit using Logisim’s “.circ“ file format. i. Submit your “.circ” file to Blackboard. Examples: (! indicates overflow) 10 11 00 11 + 01 + 01 + 01 + 11 11 ! 00 01 ! 10
© Copyright 2024