PROGRAMMABLE LOGIC CONTROLLERS BUNDLE
5th Edition
ISBN: 9781260582475
Author: Petruzella
Publisher: MCG
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 4, Problem 4P
Explanation of Solution
a.
Data stored in the destination address of AND operation:
- In AND operation, the output is always HIGH when all the inputs are HIGH and the output is LOW when any of the inputs are LOW.
- The AND operation of two inputs “Source A” and “Source B” is given below. Here, the result is stored in destination address.
- If both the inputs “Source A” and “Source B” are 1, then the output 1 will be displayed on the destination.
- Otherwise, if either of the inputs “Source A” or “Source B” is 0, then the output 0 will be displayed on the destination.
Source A:
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
Explanation of Solution
b.
Data stored in the destination address of OR operation:
- In OR operation, the output is always HIGH when any of the inputs are HIGH and the output is LOW when all the inputs are LOW.
- The OR operation of two inputs Source A and Source B is given below. Here, the result is stored in destination address.
- If either of the inputs “Source A” or “Source B” are 1, then the output 1 will be displayed on the destination.
- Otherwise, if both the inputs “Source A” and “Source B” are 0, then the output 0 will be displayed on the destination.
Source A:
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
Explanation of Solution
c.
Data stored in the destination address of XOR operation:
- In Exclusive-OR (XOR) operation, the output is always HIGH when either of the inputs is HIGH and the output is LOW when all the inputs are either HIGH or LOW.
- The XOR operation of two inputs Source A and Source B is given below. Here, the result is stored in destination address.
- If either of the inputs “Source A” or “Source B” are 1, then the output 1 will be displayed on the destination.
- Otherwise, if both the inputs “Source A” and “Source B” are 0 or 1, then the output 0 will be displayed on the destination.
Source A:
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Convert the above code to three address code
do
x = x + 2;
while (a[x] < t);
destination register after each of the following instructions executes in sequence, given that CL, DX, and AL are initialized to 3, 1001111010111100, and 01010111 respectively? Leave your answer in binary form for this question
rol dx, cl
Evaluate the following expression using three, two and one address machine format.X= (A-BX C)/(D+EXF)
Chapter 4 Solutions
PROGRAMMABLE LOGIC CONTROLLERS BUNDLE
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- If 2 bits of a byte are in error when the byte is read from ECC memory, can ECC detect the error? Can it fix the error?arrow_forwardMake a quadruples address code out of the statement below: A = - A * (A + B ) - (B – C) / Darrow_forwardCorrect Answer will upvote else downvote 10 times... Question:- What is relative addressing mode? Give example. With fig?arrow_forward
- 1. When working with characters in HLA, an individual character is a 32-bit value. a True b False 2. Unlike all of the other HLA commands, the MALLOC and FREE instructions are not always guaranteed to run. a True b Falsearrow_forwardNeed crt Answer else downvoted Translate the following into three address code while (A <B) do If (C<D) then X = Y + Z.arrow_forwardFrom the given code from step 1-step19 a- What are the memory location addresses that will be accessed in memory data segment in this program? b- What is the content of each memory location accessed in memory data segment in this program? c- What does the content of each memory location refer to?arrow_forward
- A- What is the wrong in the following statements? Correct it. 1- MOV 2222, BX 2- SUB BL, AX3- MOV DS,2352h 4- INC SI,25- MUL CL, AL B- Explain the Addressing modes in details.arrow_forwardIf two bits of a byte are in error when the byte is read from ECC memory, can ECC detectthe error? Can it fix the error?arrow_forward] The following sequence of 16-bit control words are presented to the datapath. For each, identify the microoperation that is executed as an RTL expression. Assume that Memory Write (to the RAM) is NOT asserted unless it is explicitly indicated. (a) x0001 (b) x4251 (c) xFFFE, MW assertedarrow_forward
- Translate with a three-address statement, the following expression:n = f((x+2), y) – 5arrow_forwardPlease convert the following segment of code into LEGv8/ARMv8. Assume g and h are in registers X19 and X20 respectively and explain line by line. if (g < h): g=g+ h; else: h = h * 2arrow_forwardSubject code - rcs506 Write the one address instructions for the following statement: X = (A + B) x (C + D)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrA+ Guide To It Technical SupportComputer ScienceISBN:9780357108291Author:ANDREWS, Jean.Publisher:Cengage,A+ Guide to Hardware (Standalone Book) (MindTap C...Computer ScienceISBN:9781305266452Author:Jean AndrewsPublisher:Cengage Learning
- Comptia A+ Core 1 Exam: Guide To Computing Infras...Computer ScienceISBN:9780357108376Author:Jean Andrews, Joy Dark, Jill WestPublisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
A+ Guide To It Technical Support
Computer Science
ISBN:9780357108291
Author:ANDREWS, Jean.
Publisher:Cengage,
A+ Guide to Hardware (Standalone Book) (MindTap C...
Computer Science
ISBN:9781305266452
Author:Jean Andrews
Publisher:Cengage Learning
Comptia A+ Core 1 Exam: Guide To Computing Infras...
Computer Science
ISBN:9780357108376
Author:Jean Andrews, Joy Dark, Jill West
Publisher:Cengage Learning