this assignemnt is about (programming embedded systems )HomeWork1Z1ExercisesUse RIMS to create and run a program as a solution to each of the two exercises below:1. A doorway is for exit only. Sensors A0, A1, A2 detect a person passing through. Aproper exit causes A2A1A0 to be 000, then 100, then 010, then 001, then 000. Anyother sequence causes a buzzer to sound (B0=1) until 000.2. An automatic door at a store has a sensor in front (A0) and behind (A1). Thedoor opens (B0=1) when a person approaches from the front, and stays open aslong as a person is detected in front or behind. If the door is closed and a personapproaches from the behind, the door does not open. If the door is closed and aperson approaches from the front but a person is also detected behind, the doordoes not open, to prevent hitting the person that is behind.http://ritools.cs.ucr.edu/