Find Jobs
Hire Freelancers

C assignments

$30-250 USD

Κλειστή
Αναρτήθηκε περίπου 12 χρόνια πριν

$30-250 USD

Πληρωμή κατά την παράδοση
budget is 150$ max i have 2 assignments of C as attached and i want to complete it within few day. Because of last bad experience, i will not award project directly. I have 2 question right now which are from another assignment , whoever will complete this both assignments i will award the project to him with 70% milestone. if anybody dont want to deliver the solution before the milestone, please dont bid... after these two question we will start the next assignments with full milestone. if interested, please bid and start the work, whoever will give me the first 2 solutions i will go with him, no other arguments. you have 8 hours to complete, after 8 hours project will be awarded who will give me the solution of these first 2 question. first u can finish the work of 2 question and then to access the 2nd assignment Here is the link: [login to view URL] The username and password to access the assignment is "csci2021." now Question 1: We are running programs on a machine where values of type int are 32 bits. They are represented in two's complement, and they are right shifted arithmetically. Value of types unsigned are also 32 bits. We generate arbitrary values x and y, and convert them to unsigned values as follows: /* Create some arbitrary values */ int x = random(); int y = random(); /* Convert to unsigned */ unsigned ux = (unsigned) x; unsigned uy = (unsigned) y; For each of the following C expression, you are to indicate whether or not the expression always yields 1. If it always yields 1, describe the underlying mathematical principles. Otherwise, give an example of arguments that make it yield 0. A. (x<y) == (-x>-y) B. ((x+y)<<4) + y-x == 17*y+15*x C. ~x-~y+1 == ~(x+y) D. (ux-uy) == -(unsigned) (y-x) E. ((x >> 2) << 2) <= x Question 2: Consider the following assembly code: 1. movl 8(%ebp), %esi 2. movl 12(%ebp), %ebx 3. movl $-1, %edi 4. movl $1, %edx 5. .L2: 6. movl %edx, %eax 7. andl %esi, %eax 8. xorl %eax, %edi 9. movl %ebx, %ecx 10. sall %cl, %edx 11. testl %edx, %edx 12. jne .L2 13. movl %edi, %eax The proceding code was generated by compliling C code that had the following overall form: int loop (int x, int n) { int result = ________; int mask; for (mask = ________; mask_______ ; mask = ______) { result ^= _______; } return result; } Your task is to fill in the missing parts of the C code to get a program equivalent to the generated assembly code. Recall that the result of the function is returned in register %eax. You will find it helpful to examine the assembly code before, during, and after the look to form a consistent mapping between the registers and the program variables. A. Which registers hold program values x, n, result, and mask? B. What are the initial values of result and mask? C. What is the test condition for mask? D. How does mask get updated? E. How does result get updated? F. Fill in all the missing parts of C code.
Ταυτότητα εργασίας: 1436052

Σχετικά με την εργασία

6 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 12 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
6 freelancers δίνουν μια μέση προσφορά $77 USD για αυτή τη δουλειά
Avatar Χρήστη
sddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
$31 USD σε 5 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
sir. i am ready to work. check PM thanks.
$60 USD σε 2 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
i want to this job. i will do it efficiently.
$40 USD σε 1 ημέρα
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
i am working with c++ almost 3 yers and will not disopoint u.
$30 USD σε 2 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
I'll try sending those 2 solutions to you asap.
$150 USD σε 10 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
hi, i m ready to do this work. kindly check private message. thanks
$150 USD σε 10 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0

Σχετικά με τον πελάτη

Σημαία της HONG KONG
smith, Hong Kong
0,0
0
Μέλος από Δεκ 5, 2011

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.