Professional Documents
Culture Documents
• A toll-gate has a unique method of collecting Toll. It is based on the last four digits of the vehicle
number.
• If the first and last digit in the vehicle number is an even number, then the Toll collected will be
deposited into account 1.
• If the second and third digit in the vehicle number is odd number, then the Toll is to be
deposited into account 2.
A2
A device D connects to a microcontroller through one of the ports. Once the device connects it sends
code 0AH to the microcontroller. The device disconnects by sending 0FH to the controller. During this
duration, the device sends 05 bytes of data to the controller. This data is to be saved in external memory
and starting address of the 05 bytes is to be sent to the device. Write an ALP as a solution to the
problem.
A3
Implement a calculator which performs add, sub, mul and div operations. The operation and data is to
be specified by the user through ports.
B1
B2
B3