Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Choose all correct answers.(more than 1 answer from each question) 1.What is (1<

ID: 3628840 • Letter: C

Question

Choose all correct answers.(more than 1 answer from each question)

1.What is (1<<4) | (1<<2)?

a. 20
b. 42
c. 14
d. 0x14
e. 0x20


2.What is 0x05 & 3?

a. 0x15
b. 1
c. 8
d. 53
e. 15


3. What is ~0xd4 & 0xff ?

a. 0x2b
b. 212
c. 17
d. 43
e. 0x4d

4. What is (2<<1) ^ (1<<2)?

a. 4
b. 1
c. 0x02
d. 0x00
e. 0x06


5. What is 0x10 & ~0x02?

a. 0x12
b. 0x10
c. 16
d. 18
e. 0x00


6. An AVR microcontroller has a blue LED connected to pin PB0, a green LED connected to pin PB1, and a red LED connected to pin PB7. All the LEDs are connected via current limiting resistors to ground. The other pins on port B are used for inputs. What value needs to be stored in the DDRB register?

a. 0x83
b. 124
c. 131
d. 0x7c
e. 0x73


7.Pin PC2 of an AVR microcontroller has push button 1 connected between it and ground. Pin PC5 also has push button 2 connected in the same configuration. Both pins are equipped with pullup resistors and DDRC &= ~0x24. Push button 1 is pressed and push button 2 is not. What is the value of (PINC & 0x24)?

a. 0x00
b. 0x24
c. 0x04
d. 0x20
e. 0x42


Explanation / Answer

1.a,d 2.b 3.d,a 4.c 5.b,c 6.b 7.d