Question 1. Which of the following data types should be used for an address of port in HCS12?
- int
- unsigned int
- char
- unsigned char
Question 2. Find the value for PORTB after the execution of the following code:
- PORTB = 0x55 & 0xAA;
- PORTB = 0x05
- PORTB = 0xA0
- PORTB = 0xFF
- PORTB = 0x00
Question 3. Find the value for PORTB after the execution of the following code:
- PORTB = 0x27 | 0xF0;
- PORTB = 0x02
- PORTB = 0x07
- PORTB = 0xF7
- PORTB = 0x00
Question 4. Find the value for PORTB after the execution of the following code:
- PORTB = 0xFF ^ 0x00;
- PORTB = 0x0F
- PORTB = 0xF0
- PORTB = 0xFF
- PORTB = 0x00
Question 5. Assume PORTB has a value of 0xAA. Find the value for PORTB after execution of the following code:
- PORTB = ~PORTB;
- PORTB = 0x55
- PORTB = 0x0A
- PORTB = 0xAA
- PORTB = 0x0