PROGRAMMABLE LOGIC CONTROLLERS (LOOSE PA
5th Edition
ISBN: 9781264206216
Author: Petruzella
Publisher: MCG
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 11, Problem 6RQ
Program Plan Intro
Math instruction:
- Math instructions refer to all output instructions that uses the data of two words or registers and perform the desired function.
- Math instructions are program based on the type of processor used.
- The data manipulation instructions are almost similar to math instructions.
- The math instruction allows the PLC to take more of conventional computer qualities.
- Math instructions are normally used to perform arithmetic functions on the values stored in memory words or registers.
Math functions:
The basic math functions performed by PLCs are as follows:
- Addition
- This function is used to add one piece of data to another.
- It is also called as ADD.
- Subtraction
- This function is used to subtract one piece of data from another.
- It is also called as SUB.
- Multiplication
- This function is used to multiply one piece of data by another.
- It is also called as MUL.
- Division
- This function is used to divide one piece of data from another.
- It is also called as DIV.
Terms used:
The following terms are used in the instruction.
- Source A
- Source A refers to the address of the first piece of data that is used in the instruction.
- Source B:
- Source B refers to the address of the second piece of data that is used in the instruction.
- Destination
- Destination refers to the address where the results of the instruction are stored.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
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
The instruction that moves each bit to the right, copies the lowest bit into the Carry flag, and copies the Carry flag into the highest bit position is the one that does this.
26. Find the time delay in the following program if the
crystal frequency is 1 MHz.
Do not ignore the time delay due to the first and
last instruction.
DELAY: LDI R16, 30
AGAIN: LDI R17, 35
HERE: NOP
NOP
DEC R17
BRNE HERE
DEC R16
BRNE AGAIN
RET
Chapter 11 Solutions
PROGRAMMABLE LOGIC CONTROLLERS (LOOSE PA
Ch. 11 - Explain the function of math instructions as...Ch. 11 - Prob. 2RQCh. 11 - What standard format is used for PLC math...Ch. 11 - Prob. 4RQCh. 11 - Prob. 5RQCh. 11 - Prob. 6RQCh. 11 - Prob. 7RQCh. 11 - Prob. 8RQCh. 11 - Prob. 9RQCh. 11 - Prob. 10RQ
Ch. 11 - With reference to the instruction of Figure 11-34,...Ch. 11 - With reference to the instruction of Figure 11-35,...Ch. 11 - Prob. 1PCh. 11 - Prob. 4PCh. 11 - Prob. 5PCh. 11 - Prob. 7PCh. 11 - Prob. 8PCh. 11 - With reference to math instruction program shown...Ch. 11 - With reference to the math instruction program...Ch. 11 - Prob. 11PCh. 11 - Prob. 12P
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
- After the SHR instruction is executed in the code sequence below, what is the final value for AL? MOV AL, 1010_1111b SHR AL, 2 The answer is 0010_0111. O a. The answer is 0010_1011. O b. The answer is 0011_0011. O C. The answer is 0010_0011. O d.arrow_forwardWhat happens to the Carry flag when the SHR AX,1 instruction is executed?arrow_forwardAfter the SHR instruction is executed in the code sequence below, what is the final value for AL? MOV AL, 1010_1111b SHR AL, 2 The answer is 0011_0011. a. Ob. The answer is 0010_0111. The answer is 0010_1011. Oc. Od. The answer is 0010_0011.arrow_forward
- The program counter (PC) contains the address of the next instruction -pair to be fetched from memory? a. True O b. falsearrow_forwardIn this implementation, each instruction is provided with its own data independently of how other instructions acquire theirs. We insert a(n): A Multiple Input/Output B The Case of Many Pieces of Information or Directions C Unique Information Only One D Several Insts From Onearrow_forwardWrite the machine code encoding of the assembly instruction: "mrmovq 0x230 (%rax), %rcx". Please write the bytes of the machine code in hex-decimal form, i.e., using two hex-decimal digits to represent one byte. The machine has a little-endian byte ordering. You are allowed to leave spaces between adjacent bytes for better readability.arrow_forward
- In the recursive factorial code given below, what happens if the instruction at line number 0x00400040 (addi $sp,$sp,8) is deleted by mistake from the following code? Ox00400028 fact: addi 0x0040002C 0x00400030 0x00400034 0x00400038 0x0040003C 0x00400040 0x00400044 0x00400048 L1: 0x0040004C 0x00400050 0x00400054 0x00400058 0x0040005C 0x00400060 SW SW siti beq addi ANSWER. addi jr addi jal Iw Iw $sp,$sp, -8 $ra, 4($sp) $a0, 0($sp) $t0, $a0, 1 $t0, $zero, L1 $v0, $zero, 1 $sp,$sp, 8 $ra $a0, $a0, -1 fact $a0, 0($sp) $ra, 4($sp) addi $sp,$sp,8 mult $v0, $a0,$v0 jr $ra Possible answers are as follows: a) Program enters an infinite loop and remains in the loop with the correct value stored in the vo register b) Program enters an infinite loop and remains in the loop with incorrect return value in the vo register c) Program enters an infinite loop and crashes due to memory access that exceeds the stack space d) Program will terminate properly but produce an incorrect return value in vo…arrow_forward3. From the conditional jump instructions we had discussed list the jump instructions follow the comparison of unsigned numbers.arrow_forwardAfter the SHR instruction is executed in the code sequence below, what is the final value for AL? MOV AL, 1010_1111b SHR AL, 2 )a. The answer is 0011 0011. Ob. The answer is 0010 0111. Oc. The answer is 0010_1011. Od. The answer is 0010 0011.arrow_forward
- After the SHR_instruction is executed in the code sequence below, what is the final value for AL? MOV AL, 1010_1111b SHR AL, 2 The answer is 0010 0111. а. The answer is 0010_1011. b. The answer is 0011 0011. Ос. The answer is 0010_0011. d.arrow_forwardHere, each instruction gets its own data, regardless of how other instructions obtain theirs. We use a(n): A Multiple Data/Instruction B Multiple Data/Instruction C Singular Data Single Inst D Singe Inst Multiplearrow_forwardWhat is the result of each instruction of the following program and its effect on flag register? Instruction Result MVI A,DE MVI C,10 SUI 22 MOV D.A SUB C DCR D RST5 Flagsarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L