I am trying to write a program using direct addressing and pointers on the number and create a 32 bit variable from 10136654 All operations will be done in 16 bit registers like ax, bx, etc.
But how is this possible if it must go in 16 bit from 32 bit?

a) NAND the upper 16-bits with the lower 16-bits and store the 16-bit result in a variable named MyNAND.

b) NOR the upper 16-bits with the lower 16-bits and store the 16-bit result in a variable named MyNOR

c) XOR the upper 16-bits with the lower 16-bits and store the 16-bit result in a variable named MyXOR.

d) XNOR the upper 16-bits with the lower 16-bits and store the 16-bit result in a variable named MyXNOR

2
Contributors
6
Replies
7
Views
10 Years
Discussion Span
Last Post by matt999tye

this is about the weirdest homework question ive ever come across..

XOR is the only two-way function so could only be the possible answer.

but thats a ridiculous way to handle addressing. it requires that one half basically be constant.

really? i hate my professor, he is a 75 year old insane douche bag sado-masochist. But he insists that we must do all 4 of these, and that it is possible...

i'm sorry, i totally misunderstood the question. forget everything i wrote. this is not that unusual after all.

Use your whole BCC ID number (10136654) to create a single 32-bit variable (ie 8 digits), assume the resulting number is already hexadecimal (ie do not convert the digits). Name the variable MyID. Write a program (name it P3a.cpp) that will perform the following operations, using direct addressing and pointers on that number. All operations will be done in 16 bit registers like ax, bx, etc.

a) NAND the upper 16-bits with the lower 16-bits and store the 16-bit result in a variable named MyNAND.

b) NOR the upper 16-bits with the lower 16-bits and store the 16-bit result in a variable named MyNOR

c) XOR the upper 16-bits with the lower 16-bits and store the 16-bit result in a variable named MyXOR.

d) XNOR the upper 16-bits with the lower 16-bits and store the 16-bit result in a variable named MyXNOR

Verify your results in the debugger and provide a single screen shot of the entire debugger window showing all of the answers in a single watch window. What are the answers? Type the answers (from a calculator or by hand), in your program code, as part of the program description.

gah. you're right. he is a sadist.

i'm going to apologetically back out of this now. I'm too far removed from assembly these days to be of any help. its been 5 years since i took it in school.

hopefully someone else can help you here. personally, I'd be hitting his office hours or his TA.

haha thanks for the effort, i would go to his office hours, if he had them. he runs an online class, most likely because he has no social skills.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.