answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alborosie
2 years ago
4

Imagine that you are prototyping an electronic device based on the Arduino platform and you are using a seven-segment display to

show numeric values. To reduce the number of used digital outputs of the microcontroller, the display board is connected to the main board through the integrated circuit of the decoder, which converts binary coded decimal (BCD) values to signals for the seven-segment display. So, to show any number on the display you need to set the required BCD code on the microcontroller's outputs. Write a program to convert an integer number represented as a string to a BCD code required for the display. In the BCD code, every decimal digit is encoded with its four-bit binary value. Encoding all digits of the decimal number and concatenating the resulting codes into one string you will get a resulting BCD code. A space is used to separate digits in the BCD code and make it more readable. For example, a number 173 will be encoded to BCD as 0001 0111 0011.
Computers and Technology
1 answer:
myrzilka [38]2 years ago
6 0

We can write this program (to convert an integer number represented as string to BCD code) in C++ as;

<u>Integer number (string) to BCD code using C++</u>

#include <iostream>  

#include <string>  

using namespace std;  

int binaryToDecimal(string n)  

{  

string num = n;  

int dec_value = 0;  

int base = 1;  // Initializing base value to 1, i.e 2^0

int len = num.length();  

for (int i = len - 1; i >= 0; i--) {  

 if (num[i] == '1')  

  dec_value += base;  

base = base * 2;  

}  

return dec_value;  

}  

You might be interested in
Ben uses a table that has few columns. He knows about a particular value in the first column and wants to find the corresponding
igor_vitrenko [27]
I'd suggest he uses LOOKUP Function.

You can use the LOOKUP function when you need to look in a single column or row and find a value from the same position in a corresponding column or row. We have a much improved VLOOKUP that can also be used to search one row or column or multiple rows and columns.



4 0
2 years ago
Read 2 more answers
Question 19 :Rachel, a database administrator, has created a database for her website. It contains pictures of vacations that pe
gavmur [86]

Answer:

The correct answer will be "Semi-structured data".

Explanation:

  • Semi-structured data comprise evidence that just isn't data collected in some kind of a traditional database management system, but then neither is content typed.
  • It's indeed descriptive information or structured data, but that's not organized into a theoretical design, like a chart or perhaps a graph centered through an entity.

So that the given scenario is the example of semi-structured data.

6 0
2 years ago
A wireless network was recently installed in a coffee shop and customer mobile devices are not receiving network configuration i
siniylev [52]

Answer:

make sure the DHCP server is functional

Explanation:

5 0
2 years ago
____________ is defined as the set of activities that revolve around a new software product, from its inception to when the prod
Elis [28]

Answer:

The answer is Application Lifecycle Management

Explanation:

Application lifecycle management is the complete handling and management of computer software programs from inception till it is retired.

It covers various aspects like requirement gathering management; software architecture; software programming, testing, and maintenance; change management, with continuous integration, release management, upgrades, deployment and so-on.

Application Lifecycle Management is defined as the set of activities that revolve around a new software product, from its inception to when the product matures and perhaps retires

4 0
2 years ago
Data is: a. Information endowed with relevance and purpose b. Set of specific objective facts or observations c. Some informatio
Maru [420]

Answer: b) Set of specific objective facts or observations

Explanation: Data is referred as the information that consumes the facts and figures . These facts and figure information is usually viewed or observed in the form of images, text, facts, graphs,reports etc.Data of any sort has to be stored for any use or analyzing in future so it is generally stored in the computer and other devices.Therefore,option(b) is the correct option.

4 0
2 years ago
Other questions:
  • Gaven's instructor told him to include a personal statement in his work portfolio. Why did his instructor recommend including a
    6·1 answer
  • Does the Boolean expression count &gt; 0 and total / count &gt; 0 contain a potential error? If so, what is it?
    8·1 answer
  • The area of a square is stored in a double variable named area. write an expression whose value is length of the diagonal of the
    11·1 answer
  • You are using a polynomial time 2-approximation algorithm to find a tour t for the metric traveling salesman problem. Which of t
    7·1 answer
  • Skylar is viewing her personal and business calendar in a side-by-side fashion, but she would like to view a single calendar tha
    6·1 answer
  • 1. What are the first tasks the Team Leader (TL) must perform after arriving at the staging area?
    15·1 answer
  • As a security engineer, compare and contrast the pros and cons of deploying hetero vs homogenous networks. Which costs more? Whi
    6·1 answer
  • Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
    7·1 answer
  • George is working with an image in Photoshop. He added a lot of effects to the image. He saved the first draft of the file. The
    6·2 answers
  • For a data structure, such as a stack, who is responsible for throwing an exception if the stack is empty and a pop() is called:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!