•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 426,136 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 1,765 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: Programming Forums
Views: 1143 | Replies: 7
![]() |
•
•
Join Date: Mar 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
hi my friends. I need your help, I have to solve these three problems ASAP. Please help me with this:
1)###########################################
For a set of numbers read into an integer array (arr1) populate another array (arr2) with A*x2 + B*x + c, where A, B, and C are integer constants and x represents value from arr1. The pseudocode: for (i = 0; i < size; i++) { x = arr1[i]; arr2[i] = A*x2 + B*x + C; } Your program should be able to input integers A, B, C and the values in arr1 from the keyboard.
2) ###############################################
Write a recursive routine for Binary Search of an element from a sorted list of N integers. You should be able to input N, the sorted list and the value to search from the keyboard. A main (driver) function should call the routine. Notes: A binary search is a technique for finding a particular value in a linear array, by "ruling out" half of the data at each step. A binary search finds the median, makes a comparison to determine whether the desired value comes before or after it, and then searches the remaining half in the same manner. The search begins by examining the value in the center of the list; because the values are sorted, it then knows whether the value occurs before or after the center value, and searches through the correct half in the same way. The pseudocode:
function search(a, value, left, right)
if right < left
return not found
mid := (left + right) / 2
if a[mid] = value
return mid
if value < a[mid]
search(a, value, left, mid-1)
else
search(a, value, mid+1, right)
3)########################################################
Write a program that prints the content of the instruction memory, in effect, disassembling the program. Start with the default program memory address of 0x00400000; read words from the memory sequentially and output the first N instructions on the console. N will be an integer read from the keyboard.
As an example, if you have:
Address Content
---------------------------------------
[0x00400000] 0x3408010a
[0x00400004] 0x3409000c
[0x00400008] 0x01195120
in the memory, the result of running your program with N = 3, would print the following to the console window:
0x3408010a
0x3409000c
0x01195120
################################################
please please i really really need you guys
Thanks
1)###########################################
For a set of numbers read into an integer array (arr1) populate another array (arr2) with A*x2 + B*x + c, where A, B, and C are integer constants and x represents value from arr1. The pseudocode: for (i = 0; i < size; i++) { x = arr1[i]; arr2[i] = A*x2 + B*x + C; } Your program should be able to input integers A, B, C and the values in arr1 from the keyboard.
2) ###############################################
Write a recursive routine for Binary Search of an element from a sorted list of N integers. You should be able to input N, the sorted list and the value to search from the keyboard. A main (driver) function should call the routine. Notes: A binary search is a technique for finding a particular value in a linear array, by "ruling out" half of the data at each step. A binary search finds the median, makes a comparison to determine whether the desired value comes before or after it, and then searches the remaining half in the same manner. The search begins by examining the value in the center of the list; because the values are sorted, it then knows whether the value occurs before or after the center value, and searches through the correct half in the same way. The pseudocode:
function search(a, value, left, right)
if right < left
return not found
mid := (left + right) / 2
if a[mid] = value
return mid
if value < a[mid]
search(a, value, left, mid-1)
else
search(a, value, mid+1, right)
3)########################################################
Write a program that prints the content of the instruction memory, in effect, disassembling the program. Start with the default program memory address of 0x00400000; read words from the memory sequentially and output the first N instructions on the console. N will be an integer read from the keyboard.
As an example, if you have:
Address Content
---------------------------------------
[0x00400000] 0x3408010a
[0x00400004] 0x3409000c
[0x00400008] 0x01195120
in the memory, the result of running your program with N = 3, would print the following to the console window:
0x3408010a
0x3409000c
0x01195120
################################################
please please i really really need you guys
Thanks
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,174
Reputation:
Rep Power: 38
Solved Threads: 930
sorry -- we are not a software factory.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: Mar 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Come on guys I'm running out of time
Who ever solve it I'm gonna pay him
if I didn't hand it by tomorrow they gonna kick me out of the school
please any thing, it has not be perfect just any thing:rolleyes:
Who ever solve it I'm gonna pay him
if I didn't hand it by tomorrow they gonna kick me out of the school
please any thing, it has not be perfect just any thing:rolleyes:
•
•
Join Date: Jan 2007
Posts: 49
Reputation:
Rep Power: 2
Solved Threads: 0
Sounds like you should be kicked out of school if you waited till the last day to start the assignment. Sympathy is a word in the dictionary.
•
•
Join Date: Jan 2007
Posts: 49
Reputation:
Rep Power: 2
Solved Threads: 0
Bite me slacker. You deserve your fate.
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,905
Reputation:
Rep Power: 32
Solved Threads: 117
Why don't you try the assignment yourself and show us what you're having a problem with, where you're stuck, or what it's not doing that you want it to do. And then we'll help you out. But it's very discouraging when people just ask us to do their assignments for them.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,174
Reputation:
Rep Power: 38
Solved Threads: 930
Thread closed.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
![]() |
•
•
•
•
•
•
•
•
DaniWeb Assembly Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Please help me out, I realy need help in the next 4 hours (C++)
- URGENT!! - Constructive Criticism needed on www.giftday.co.za (Website Reviews)
- Urgent: Please Help Computer Keep Saying Kernel_data_inpage_error And Some Times Kern (Storage)
- Urgent help needed (Database Design)
- Urgent help needed regarding Internet connection please. (Windows NT / 2000 / XP / 2003)
- mail I send sometimes takes hours???? (Web Browsers)
- Homepage keeps switching back to a porn site (Web Browsers)
- Importing SQL Script File - Urgent !! (Database Design)
Other Threads in the Assembly Forum
- Previous Thread: Two-Dimensional Arrays
- Next Thread: Your opinion of Assembly:


Linear Mode