Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Who's Online 0

Don't Hesitate for ask Question, post your assignment with hope you will find best solution.

CS401 Assignment No 2 solution and Discussion

Computer Architecture and Assembly Language Programming (CS401) Assignment # 02

Q1. Write a subroutine to sort an array in ascending order by Selection Sort.                        (20 Marks)

 

You can understand the working of selection sort by this example:

array[] = 64 25 12 22 11
// Find the minimum element in array[0...4]
// and place it at the beginning i.e. index 0 of the array
11 25 12 22 64

// Find the minimum element in array[1...4]
// and place it at index 1 
11 12 25 22 64

// Find the minimum element in array[2...4]
// and place it at index 2 
11 12 22 25 64

// Find the minimum element in array[3...4]
// and place it at index 3 
11 12 22 25 64 

Array should contain your VU ID as signed integers e.g.


VU ID: BC190206435


Array: -1,-9, 0,-2, 0,-6,-4,-3,-5


After Sorting: -9,-6,-5,-4,-3,-2,-1,0, 0


 


“The End”

Comments

  • ansaraliansarali Posts: 25,240
    1:_How stack is helpful in assembly language?
    2: Difference bw shift logical left (SHL) And shifT Arithmetic
    Left (SAL)?
    3: Which Instruction use in assembly to swap the value off two oprends?
    4:Soppose we are trying to divide accumulate Reg by a numeric value 2. Write code with shift instruction?
    5:How CALL instruction change its behavior for inter-segment calling and for intra-segment calling?
    6:Look at the pseudo-code and write it in Assembly Language:
    If (AL>BL) AND (BL>CL)
    {
    CX = 1
    }
  • ansaraliansarali Posts: 25,240
    : Cs401
    Mostly mcqs from moaaz files and5short questions of 3 number
    5 long questions of 5 numbers mostly from past papers
    [8/24, 9:55 AM] : CS408

    Q1) What outputs will be generated from the following data?

    Computer + Microwave =?

    Computer + Data = ?

    Computer + Information =? (3)

    Q2) By breaking down skeleton plane into its component elements, how do all the pieces fit together to create this as a whole user experience? (3)

    Q3) Suppose you are a system analyst. With your work experience briefly describe when it is useful to observe in context to observation process? (3)

    Q4) Give three advantages of using low fidelity prototyping (3)

    Q5) A software house “xyz ltd” develops a new web browser with innovative features. Now the developers of this browser want to know if users find items faster with their product.To findout these points developer wants to perform user testing. Why “xyz ltd” investing in user testing? Give at least three good reasons. (3)

    Q6) You have to design persona based design solutions in a company “ABC”. According to your experience which step in requirement definition serves as primary purpose of eliminating as much designer bias as possible before launching into scenarios, preparing the designers to take on the roles of the primary personas during the scenario process? (5)

    Q7) In human beings, Input is done mainly through the senses and out put through the motor control of the effectors? Differentiate between effectors and Senses. Also Mention the names of Receptors and senses. (5)

    Q8) Suppose you are an IT officer in XYZ Company. A typist comes to you, asked about blind and explanatory undo. How you differentiate blind and explanatory undo in front of him. (5)

    Q9) There is a limitation to the interaction between a user and a personal computer. How Wearable Computing removes this limitation? Also elaborate its negative aspects on society. (5)

    10) Hassan is working as a system analyst in “ABC.org”. He follows ethical code to preserve people’s privacy. Which guidelines will help him to ensure that evaluations are done ethically and that adequate steps to protect users rights have been taken? Give at least five guidelines. (5)
  • ansaraliansarali Posts: 25,240
    Cs401
    50 questions
    40 mcqs 80% from past papers
    1. In truncated file service which register read service and file attributes
    2.SACS instruction works?
    3.which interrupt is called scheduler.which main purpose of that.
    4.which interrupt interrupt and control back to dos.write name of interrupt and service number.
    5.serial port intiziltaion service number and also write attributes of it with service number those initialize them.
    6.physical address btna tha
    7.data movment instruction de v thi un ka btna tha k kon sy processor me use hoti hain.
    8.code dia hua tha btna tha k instruction kya kam kr rhi us me.
    9.code likhna tha apna name on top of screen show krny ka.
    10.code likhna tha aik array ka jis me 128 elements ho har element 4 byte ka ho or har element ki value 0 ho.
    Overall paper bhut easy tha..
Sign In or Register to comment.

ACC311 ACC501 ACC311  ACC501 ACF619  ACFI619 BIF401 BIF402 BIF501 BIF601 BIF602

BIF604 BIF619 BIF720 BIF731 BIF732 BIF733 BIT701 BIT703 BIT710 BIT715 BIO101 BIO102 

BIO201 BIO202 BIO203 BIO204 BIO301 BIO302 BIO303 BIO401 BIO502 BIO503 BIO601 BIO731 

BIO732 BIO733 BIO734 BNK601 BNK603 BNK604 BNK610 BNK612 BNK619 BNK620

BNK701 BNK703 BNK704 BNK725 BNKI619 BNKI620 BT101 BT102 BT201 BT301 BT302 BT401

BT402 BT403 BT404 BT405 BT406 BT503 BT504 BT505 BT601 BT603 BT605 BT619 BT720 BT731

BT732 BT733 BT734 BT735 BTI619

CS001 CS101 CS201 CS202 CS204 CS205 CS206 CS301 CS302 CS304 CS310 CS311 CS312 CS314 CS315 CS401

CS402 CS403 CS405 CS406 CS407 CS408 CS409 CS410 CS411 CS420 CS431 CS432 CS435 CS441 CS501 CS502 

CS504 CS506 CS507 CS508 CS510 CS519 CS601 CS602 CS603 CS604 CS605 CS606 CS607 CS608 CS609 CS610

CS611 CS614 CS615 CS619 CS620 CS625 CS701 CS702 CS703 CS704 CS706 CS707 CS708 CS709 CS710 

CS711 CS712 CS713 CS716 CS718CS720 CS721 CS723 CS724 CS726 CS799 COM619 COMI619