Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using assembly language, 8051 microcontroller instruction set 1. (8 points) Write a program that will perform multiplication on two 4 bit numbers entered using switches

image text in transcribed

using assembly language, 8051 microcontroller instruction set

1. (8 points) Write a program that will perform multiplication 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. (c) 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 multiply the numbers 7 and 3, 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 21, then LEDs 0,2, and 4 must be turned ON to represent the result (2110=000101012)

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago