c programming
€8-30 EUR
Paid on delivery
Arrays and bitwise operations
In a nuclear plant there are 50 displays, each of them has 4 LEDs to show if there are some emergencies in progress.
LED 0: Core Overheating
LED 1: Core Low Power
LED 2: Radiation Leak
LED 3: Warning Siren (active if and only if at least one of the previous warnings is ON)
Futrhermore, the building is splitted into two wings:
Wing 1: Displays 0-24
Wing 2: Displays 25-49
Implement a program in which the user can control these displays, one by one.
Requirements:
⦁ Each display shall be represented with an unsigned int variable
⦁ +The displays themselves shall be declared as an array of such unsigned int
⦁ Each LED is represented by a bit in such unsigned int variable. For instance:
Display 0: bit.0 is the Core Overheating LED of the first display. When Core Overheating is ON, display[0] == 9 because both bit.0 (Core Overheating) and bit.3 (Warning Siren) are set
Display 49: bit.3 is the Warning Siren LED of the 50th display. When the Warning Siren is ON, display[49] is > 8 because we need LED3 (bit.3) active + AT LEAST another LED active
⦁ The user shall first specify the display of interest
⦁ The user shall specify which wing such display is part of
⦁ If the user wants to act on a display which is in the other wing, the action must be forbidden (e.g. I want to turn ON an LED on display 2 of wing 2 ==> Error because display 2 is in wing 1)
⦁ The user shall be able to turn ON or to turn OFF an LED of the previously specified display. If the display is already in the desired state, nothing should change
⦁ The user shall be able to retrieve the information about a specified display, which will be printed on screen using this template:
Information of Display 23 - Wing 1
Core Overheating: 1
Core Low Power: 0
Radiation Leak: 0
Warning Siren: 1
⦁ The Warning Siren LED (bit.3) can't be changed directly by the user, it must be turned ON/OFF automatically depending on the current state of the other three LEDs
⦁ The function to change the LEDs status must be implemented outside main()
⦁ Use bitwise operations to set/clear the LEDs. (operators: | & << >> |= &= )
Project ID: #28991277
About the project
Awarded to:
Hello sir/madam... I can make your C application as per requirements stated in job description. Please, contact me to make deal. Regards Vladimir
5 freelancers are bidding on average €33 for this job
C is my best programming skill, and I have used bitwise operations many times. Can finish your project for a few hours.
Hi I have a lot of experience with C and bitwise operations and can help you with your problem. I can start working immediately, so if you're interested, I'd love to discuss more about this in chat.
An easy project to be done with around 20 classes of microcontrollers thanx................................................................
Welcome Sir I can help you in successfully completing your project. I am an expert in the Arduino field. I have done many similar projects for this work. Send me all the details. Here are some of my work I unveiled an More