1 / 9

CS 206D Computer Organization Lab4

CS 206D Computer Organization Lab4. Logic Instructions. Logic instructions. Logic instructions. AND destination , source OR destination , source XOR destination , source NOT destination. AND.

lanai
Download Presentation

CS 206D Computer Organization Lab4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 206D Computer Organization Lab4 CS 111

  2. Logic Instructions Logic instructions CS 111

  3. Logic instructions • ANDdestination, source • ORdestination, source • XORdestination, source • NOTdestination CS 111

  4. AND CS 111 • The AND instruction can be used to clearspecific Destination bits while preserving the others. • A zeromask bit clears the corresponding Destination bit • A onemask bit preserves the corresponding destination bit.

  5. OR CS 111 The OR instruction can be used to setspecific Destination bits while preserving the others. A one mask bit sets the corresponding Destination bit A zero mask bit preserves the corresponding Destination bit.

  6. XOR CS 111 • The XOR instruction can be used to invertspecific Destination bits while preserving the others. • A onemask bit inverts the corresponding Destination bit • A zeromask bit preserves the corresponding Destination bit.

  7. Programming questions – q 1 • Declare data and display prompt message CS 111

  8. Programming questions – q 1 (Cont.) • Read binary number • We assume that the input characters are either ‘1’ , ‘0’ or carriage return. And at most 16 bits are input. CS 111

  9. Programming questions – q 1 (Cont.) • Output the content of BX in HEX. CS 111

More Related