What does this program do?

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 10RQ: What primitive data types can normally be represented and processed by a CPU?
icon
Related questions
Question

What does this program do? 

 

Convert the following into Pep/9 assembly language:
#include <iostream>
using namespace std;
int num
int main() {
cin >> num;
num = num % 16;
cout << "num=" << num << endl;
return 0;
Hint for the %16 part:
0 % 16 = 0
1% 16 = 1
2% 16 = 2
...
14 % 16 = 14
15 % 16 = 15
16 % 16 = 0
17 % 16 = 1
30 % 16 = 14
31 % 16 = 15
32 % 16 = 0
Convert all the results to binary. What do they all have in common?
Transcribed Image Text:Convert the following into Pep/9 assembly language: #include <iostream> using namespace std; int num int main() { cin >> num; num = num % 16; cout << "num=" << num << endl; return 0; Hint for the %16 part: 0 % 16 = 0 1% 16 = 1 2% 16 = 2 ... 14 % 16 = 14 15 % 16 = 15 16 % 16 = 0 17 % 16 = 1 30 % 16 = 14 31 % 16 = 15 32 % 16 = 0 Convert all the results to binary. What do they all have in common?
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning