Physics · Microcontrollers
If 8 LEDs are interfaced to Port 2 of an 8051 microcontroller such that all of their cathodes are connected to ground, what happens when you execute the statement 'P2 = P2 | 0x01;'?
- 1Clears all bits of P2
- 2Sets all bits of P2
- 3Turns ON the LED at P2.0✓
- 4Turns OFF the LED at P2.0
Correct answer
Turns ON the LED at P2.0
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Physics?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Microcontrollers?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Physics · Microcontrollers