Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

also draw a flow chart (Please write with clear hand writing) (10 points) Write a program that will perform addition on two 4 bit numbers

image text in transcribed

image text in transcribed

also draw a flow chart

(Please write with clear hand writing)

(10 points) Write a program that will perform addition on two 4 bit numbers entered using switches and displays the result on LEDs. Your design should be implemented in such away that it works on EdSim51 simulator correctly (i.e. using the available switches and LEDs) The following are the assumptions you should follow: (a) Numbers entered are assumed to be unsigned and each is assumed to be 4-bit long. b) Switches S3-S0 are used to enter the first number whereas S7-S4 are used to enter the second one. If a switch is closed, this means that this bit position is equal to 0 otherwise it is 1 e) The LEDs must be used to display the result as a binary number (d) When displaying your result, it is assumed that a turned ON LED represents a value 1 at that bit position whereas an OFF LED represent value 0 (e) Your program should continuously perform this addition (i.e. an infinite loop) such that if the numbers entered are changed (switch state modified), the output change accordingly For example, if you want to add the numbers 7 and 2, to specify value 7 as the first number, only switch S3 must be closed. As for the second number, value 2, it is specified by closing switches S7, S6 and S4. Since the result is 9, then LEDs 0 and 3 must be turned ON to represent the result (910-000010012). For grading purposes, please submit the following: . A block diagram that shows the connectivity of the LEDs and switches to the 8051 (connections to Vcc/GND for LED and switches must be shown as well). . Flow chart representing your implemented algorithm. Source code with comments (soft copy of your program). If no soft copy of your program is submitted, it will not be graded. .A short discussion describing the main idea of your implementation

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Introduce and define metals and nonmetals and explain with examples

Answered: 1 week ago

Question

What is IUPAC system? Name organic compounds using IUPAC system.

Answered: 1 week ago

Question

What happens when carbonate and hydrogen react with carbonate?

Answered: 1 week ago