CBSE BOARD XII, asked by alihamad5320, 5 months ago

Suppose integer takes 1 byte of memory space. Write a C++ program which takes 2 integer inputs from user (value must be between 1-100 and first integer must be last 2 digit of your arid number). Convert both input number in binary format and Store each bit in an array. Add both binary numbers and store in separate memory. Finally convert the binary sum into decimal format and display on the screen as shown in the following output. You can use pow() function of math.h header file, for calculation of power

Answers

Answered by purneetkaur93
0

Answer:

See the answer

C++

Note : Please Must Add the screen shot of the output of this program

Q.No.3. Suppose Integer takes 1 byte of memory space. Write a C++ program which takes 2 integer inputs from user (value must

Show transcribed image text

Expert Answer

C++ program to convertthe numbers to binary and add thm and display the result #include <iostream> #include <algorithm> using namespace std; int * ToBinary(int n) { int bi[3

view the full answer

Previous question

Next question

Transcribed Image Textfrom this Question

Q.No.3. Suppose Integer takes 1 byte of memory space. Write a C++ program which takes 2 integer inputs from user (value must be between 1-100 and first integer must be last 2 digit of your arid number). Convert both input number in binary format and Store each bit in an array. Add both binary numbers and store in separate memory. Finally convert the binary sum into decimal format and display on the screen as shown in the following output. You can use pow() function of math.h header file, for calculation of power. Add screen shot of your program output after the code. Output: Enter First Integer (last 2 digit of your arid number): 23 Enter Second Integer (Any number between 1-100):15 First Binary Conversion:0 0010111 Second Binary Conversion:0 0 0 0 1111 Answer Binary Conversion to 0100110 The Anser in decimal is:39 Answer Q. No. 3:

Answered by zufishaazmi2208
0

Answer:

Suppose integer takes 1 byte of memory space. Write a C++ program which takes 2 integer inputs from user (value must be between 1-100 and first integer must be last 2 digit of your arid number). Convert both input number in binary format and Store each bit in an array. Add both binary numbers and store in separate memory. Finally convert the binary sum into decimal format and display on the screen as shown in the following output. You can use pow() function of math.h header file, for calculation of power

Similar questions
Math, 11 months ago