H.W: Let register A = 1101 1001, determine the B operand and the logic micro-operation to be performed in order to change the value in A to: a) 0110 1101 b) 1111 1101

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Co Architectures & organization Solution at the bottom of the page, the steps are the same above
Let A be a processor register and Ba register that hold a logic
operand by which we can change reg. A, then we can have:
1- The selective-set operation: sets to 1 the bits in A where they are
corresponding 1's in B
Ex. : let A = 1010 and we want to set the left two bits into l's, such
that A will be = 1110.
Sol.: we use the B operand = 1100 together with OR logic
operation:
1010 A before
1100 B (logic operand)
----------
1110 A after : A+AvB
In assembly: OR AX , BX
2- The selective-complement operation: complements bits in A
where they are corresponding l's in B.
Ex. : let A = 1010 and we want to complement the left two bits.
such that A will be = 0110.
Sol. : we use the B operand = 1100 together with X-OR logic
operation, because x 00 = x and x O1 = x':
1010 A before
1100 B (logic operand)
---- -
0110 A after; A+AOB
In assembly : XOR AX, BX
3- The mask operation: clears to zero the bits in A where
they are corresponding O's in B.
Ex. : let A = 1010 and we want to clear the left two bits , such
that A will be = 0010
Sol.: we use the B operand = 0011 together with AND operation:
1010 A before
0011 B (logic operand)
0010 A after; AAAB
In assembly : AND AX , BX
The insert operation: inserts a new value into a part of register .
This is done by first masking (ANDing ) the unwanted bits and
then ORing them with the required value.
Ex. : let A = 0110 1010, replace the most left four bits by the value
1001 such that A will be = i001 1010.
Sol.: 01101010 A before
00001111 B (mask)
------------ -
00001010 A after masking : A+AA B
00001010 A before
10010000 B (insert)
---------------
10011010 A after insertion; AAVB
5- The clear (compare) operation: compares the words in A and B
and produces an all O's result if the two numbers are equal .This can
achieved by using E-OR operation.
ex. : 1010 A
1010 B
------
0000 ; A+ AOB
H.W: Let register A = 1101 1001, determine the B operand
and the logic micro-operation to be performed in order to
change the value in A to:
a) 0110 1101
b) 1111 1101
Transcribed Image Text:Let A be a processor register and Ba register that hold a logic operand by which we can change reg. A, then we can have: 1- The selective-set operation: sets to 1 the bits in A where they are corresponding 1's in B Ex. : let A = 1010 and we want to set the left two bits into l's, such that A will be = 1110. Sol.: we use the B operand = 1100 together with OR logic operation: 1010 A before 1100 B (logic operand) ---------- 1110 A after : A+AvB In assembly: OR AX , BX 2- The selective-complement operation: complements bits in A where they are corresponding l's in B. Ex. : let A = 1010 and we want to complement the left two bits. such that A will be = 0110. Sol. : we use the B operand = 1100 together with X-OR logic operation, because x 00 = x and x O1 = x': 1010 A before 1100 B (logic operand) ---- - 0110 A after; A+AOB In assembly : XOR AX, BX 3- The mask operation: clears to zero the bits in A where they are corresponding O's in B. Ex. : let A = 1010 and we want to clear the left two bits , such that A will be = 0010 Sol.: we use the B operand = 0011 together with AND operation: 1010 A before 0011 B (logic operand) 0010 A after; AAAB In assembly : AND AX , BX The insert operation: inserts a new value into a part of register . This is done by first masking (ANDing ) the unwanted bits and then ORing them with the required value. Ex. : let A = 0110 1010, replace the most left four bits by the value 1001 such that A will be = i001 1010. Sol.: 01101010 A before 00001111 B (mask) ------------ - 00001010 A after masking : A+AA B 00001010 A before 10010000 B (insert) --------------- 10011010 A after insertion; AAVB 5- The clear (compare) operation: compares the words in A and B and produces an all O's result if the two numbers are equal .This can achieved by using E-OR operation. ex. : 1010 A 1010 B ------ 0000 ; A+ AOB H.W: Let register A = 1101 1001, determine the B operand and the logic micro-operation to be performed in order to change the value in A to: a) 0110 1101 b) 1111 1101
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY