User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 391,821 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,625 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser:
Views: 374 | Replies: 6
Reply
Join Date: Feb 2008
Posts: 12
Reputation: matt999tye is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
matt999tye matt999tye is offline Offline
Newbie Poster

32 to 16

  #1  
Mar 10th, 2008
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 699
Reputation: jephthah is a jewel in the rough jephthah is a jewel in the rough jephthah is a jewel in the rough 
Rep Power: 4
Solved Threads: 45
jephthah's Avatar
jephthah jephthah is offline Offline
Practically a Master Poster

Re: 32 to 16

  #2  
Mar 11th, 2008
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.
Reply With Quote  
Join Date: Feb 2008
Posts: 12
Reputation: matt999tye is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
matt999tye matt999tye is offline Offline
Newbie Poster

Re: 32 to 16

  #3  
Mar 11th, 2008
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...
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 699
Reputation: jephthah is a jewel in the rough jephthah is a jewel in the rough jephthah is a jewel in the rough 
Rep Power: 4
Solved Threads: 45
jephthah's Avatar
jephthah jephthah is offline Offline
Practically a Master Poster

Re: 32 to 16

  #4  
Mar 11th, 2008
i'm sorry, i totally misunderstood the question. forget everything i wrote. this is not that unusual after all.

do you have any more information about this problem?
Last edited by jephthah : Mar 11th, 2008 at 11:28 am.
Reply With Quote  
Join Date: Feb 2008
Posts: 12
Reputation: matt999tye is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
matt999tye matt999tye is offline Offline
Newbie Poster

Re: 32 to 16

  #5  
Mar 11th, 2008
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.
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 699
Reputation: jephthah is a jewel in the rough jephthah is a jewel in the rough jephthah is a jewel in the rough 
Rep Power: 4
Solved Threads: 45
jephthah's Avatar
jephthah jephthah is offline Offline
Practically a Master Poster

Re: 32 to 16

  #6  
Mar 11th, 2008
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.
Reply With Quote  
Join Date: Feb 2008
Posts: 12
Reputation: matt999tye is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
matt999tye matt999tye is offline Offline
Newbie Poster

Re: 32 to 16

  #7  
Mar 11th, 2008
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Assembly Marketplace
Thread Tools Display Modes

Other Threads in the Assembly Forum

All times are GMT -4. The time now is 5:45 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC