LogixPro PLC Lab Manual for Programmable Logic Controllers
5th Edition
ISBN: 9781259680847
Author: Frank D. Petruzella
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Chapter 11, Problem 7P
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 programmed based on the type of processor used.
- The data manipulation instructions are almost similar to math instructions.
- 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.
MOV instruction:
- Move (MOV) instruction is used to copy the data of the source register into destination register.
- Here, the contents of the source register will not be altered.
- In other words, it is used to copy the value in one word or register to another word or register.
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
Home Work: Execute the following instruction using all previous instruction
format types:
1- X = (A + B)* (C + D)
2- S = F-(C*B)+M
3- N= (A+B*C)/ (F*E)
Given a memory load instruction, "mov R0; [R1+1000]," please give the input that should be selectedat each multiplexer. You can write "none" for the multiplexers that are not used for this instruction.(a) MUX1:(b) MUX2:(c) MUX3:(d) MUX4:
) State whether the following instructions are valid or invalid? Define the valid instructions. In case any instruction is invalid then state the reason of their invalidity.
ADD BX, [1234H]
AND 23H, AL
CMP AL, SP
JCXZ Telecom
IMUL BL
Chapter 11 Solutions
LogixPro PLC Lab Manual for Programmable Logic Controllers
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
Similar questions
- A(n) ____________________ instruction copies data from one memory location to another.arrow_forwardTwo 1-bit values generate a 1 result value when a(n) _____ instruction is executed. All other input pairs generate a 0 result value.arrow_forwardPlease answer this question and provide the explanation Assume the values of %ecx is 0x00000005 and %edx is 0x00000003. What would be the value of %ecx and %edx after performing the following instruction? 0x5555555461a <+0>: leal (%ecx, %edx, 8), %edx %ecx = 0x00000005, %edx = 0x0000003A %ecx = 0x00000005, %edx = 0x00000018 %ecx = 0x00000005, %edx = 0x00000030 %ecx = 0x00000005, %edx = 0x00000003 %ecx = 0x00000005, %edx = 0x0000001D %ecx = 0x00000005, %edx = 0x00000040 %ecx = 0x00000055, %edx = 0x0000001D %ecx = 0x00000005, %edx = 0x0000002A %ecx = 0x00000005, %edx = 0x00000025 %ecx = 0x00000005, %edx = 0x00000035arrow_forward
- Multiple choice a. Select an instruction form the following that tests bit position 2 of register CH. a. TEST CH, 2 b. BT CH, 2 c. a and b d. NOTCA. After the execution of instruction NEG AX, what will be the value of AX with initialvalue of 01101101? a. 10010010 b. 10010000 c. 10010011 d. 10010100arrow_forwardWhat would happen if an instruction was disobeyed, and why would that be the case? In the following scenarios, a TLB that is maintained by software is more efficient than one that is handled by hardware:arrow_forwardExplain....... Given a memory load instruction, "mov R0; [R1+1000]," please give the input that should be selectedat each multiplexer. You can write "none" for the multiplexers that are not used for this instruction.(a) MUX1:(b) MUX2:(c) MUX3:(d) MUX4:arrow_forward
- You are designing a floating point coprocessor which will execute floating point instructions 5 times as fast as the regular processor with zero overhead. Given a workload that contains 25% floating point instructions, what is the speedup achieved by adding the coprocessor to the system? Please give the speedup with exact precision.arrow_forwardSuppose the logic blocks used to implement the processor as discussed in class have the following delays: Instr/Data Memory Access Register File Decode+Read Mux ALU Adder (outside ALU) Single gate delay Register read Register Write Sign Extend 250ps 150ps 25ps 200ps 150ps 5ps 30ps 20ps 50 a) How much time would you expect to take to execute an R-type instruction based on the details studied in class? b) How much time would you expect to take to execute an lw instruction based on the details studied in class? (0.4 c) Based on these two questions, is it possible to guess what would the (minimum) clock cycle time be of such a processor if the instructions are executed in one cycle? If yes, indicate it. If it is not, state the reason why not.arrow_forwardIn this case, every instruction receives its own data, independent of how the data for other instructions is obtained. We make advantage of a: A Multiple Data/Instruction B Multiple Iterations of Data or Instruction C Singular Data Single Inst D Singe Inst Multiplearrow_forward
- A word in main memory may contain an instruction or a binary number in twos complement notation. Demonstrate that this instruction repertoire is reasonably complete by specifying how the following operations can be programmed: (a) Data transfer: location X to accumulator, accumulator to location x (b) Addition: Add contents of location X to accumulator (c) Conditional branch (d) Logical OR (e) I/O operationsarrow_forwardRead the Assembly program carefully, understand its working/functionality and answer the below given question. MOV DX, 0090 MOV DS, DX MOV BX, 0010 MOV SI, 0020 MOV AL,00 MOV DL, [SI] MOV CX, 000AP1: CMP DL, [BX] JNZ P2 ;JNZ is Jump if ZF=0 in the result of CMP instruction INC ALP2: INC BX INC SI DEC CX MOV DL, [SI] CMP CX, 0 JA P1 MOV [0030], AL INT E0090:0010 DB B8, 6F, 23, D0, 99, C5, 89, 9D, 1A, 810090:0020 DB 37, 6F, 32, B6, 11, C5, 98, 2B, 7A, C0 a. What will be displayed on the LCD after the execution of program?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningPrinciples of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning