1answer.
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
mixer [17]
3 years ago
13

#Electrical Engineering

Computers and Technology
1 answer:
GrogVix [38]3 years ago
5 0

Answer:

yes

Explanation:

where's our question

You might be interested in
Programming challenge description: Write a program that, given two binary numbers represented as strings, prints their sum in bi
Lubov Fominskaja [6]

Answer:

The program to this question can be given as:

Program:

#include<iostream>  //include header file

using namespace std;  

string add(string a, string b)  //define add function

{       //declare variable  

   string result = "";  

   int sum = 0,k,l;      

   cahr x;    

   k= a.size() - 1;

   l = b.size() - 1;  

   while (k>= 0 || l>= 0 || sum == 1) //loop

   {

   //addition 

       sum= sum+ ((k >= 0)? a[k] - '0': 0);  

       sum= sum+ ((l >= 0)? b[l] - '0': 0);

        x=sum%2;

      result=(x+'0') +result;

  // Compute carry

       sum =sum/ 2;  

       // Move to next digits  

       k--;  

       l--;  

   }  

   return result; //return value

}

int main()  //main method  

{  

   string a,b;  //string variable

   cout<<"Enter first binary digit: ";  //message.

   cin>>a;     //input from user

   cout<<"Enter Second binary digit: ";  //message.

   cin>>b;     //input from user

   cout <<"Addition :"<<add(a, b)<<endl; //print addition

   return 0;  

}

Output:

Enter first binary digit: 1101

Enter Second binary digit: 100

Addition :10001

Explanation:

In the above c++ program first, we include the header file. Then we define the add function in the add function we add two binary digits by passing value as arguments. In this function, we define a variable that is used on the addition of binary numbers. In this function we define the loop in the loop we check if two binary number is 1 then it will print 0 and pass 1 as the carry. after performing addition it will return value. In the main function, we take two binary numbers from the user and pass the value to the function and print function return value.

8 0
3 years ago
What are several networks connected together using a router
elixir [45]

Answer:

local Area Network, Wide Local Area Network and Personal Area Network

8 0
3 years ago
Using positive self talk is a great way to
lora16 [44]
Boost your self esteem and confidence.
7 0
2 years ago
Read 2 more answers
The 16 broad career options developed by the US department of education are called
In-s [12.5K]
The answer is career clusters. 
6 0
3 years ago
Thinking actively promotes critical thinking. Explain how thinking actively promotes critical thinking
pav-90 [236]

A critical thinker is someone who is actively engaged in a thought process. Active thinking is that process of making judgments about what has happened while critical thinking involves a wide range of thinking skills that eventually leads to a desired outcome. Active thinking prompts learning during complex problems situations and provides learners with an opportunity to think about how a problem will be solved. As a result, it will help them evaluate, analyze, and intercept information.

8 0
3 years ago
Other questions:
  • Although the original BBS system was simple, it increased people's ability to communicate
    14·1 answer
  • What is the definition of framerate?
    7·1 answer
  • Keeping in mind the role the order of precedence plays in equations, what would Excel display as the result of the following equ
    15·1 answer
  • You select a database or change to a different database with the ____ function.
    10·1 answer
  • Which of the following OSI layers is responsible for the segmentation, multiplexing, flow control and host-to-host communication
    6·1 answer
  • Write a program that prompts the user to input five decimal numbers. The program should then add the five decimal numbers, conve
    5·1 answer
  • Which attribute defines the file name for the specific image in an image tag??
    13·1 answer
  • Test if the word mold is stored in the variable word.
    5·1 answer
  • What is the full form of 'Rom<br>​
    7·2 answers
  • Have the javascript function CountingMinutes(str) take the str parameter being passed which will be two times (each properly for
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!