Operators in VHDL Digital Design using VHDL by Ravinder Nath Rajotiya - May 13, 2021May 13, 20210 OPERATORS VHDL has a wide set of operators. These are specific to the data types, all operators do not operate on every data types. They are further divided into groups of the same precedence level (priority).Table below shows all operators as per their precedance low to high, row-1 has the lowest priority whereas operators of row-7 has the highest priority. Within each row the priority is from left to right with the leftmost having highest priority. Class Operator Precedence Low high Same Operator Precedence (Applied Left –to-Right) 1. Logical operators and or nand nor xor xnor 2. Relational operators = /= < <= > >= 3. Shift operators sll srl sla sra rol ror 4.Addition operators + = & 5. Unary operators + - 6. Multiplying op. * / mod rem 7. Miscellaneous op. ** abs not The order of precedence is the highest for the operators of class 7, followed by class 6 with the lowest precedence for class 1. Unless parentheses are
Logical and Shift and Rotate Instructions 8086 8086 Microprocessor by Ravinder Nath Rajotiya - December 14, 2020May 10, 20210 LOGICAL Group of Instructions. Bit manipulation instruction Bit Manipulation instructions : The instruction in this category operate on bits. The instruction can set, reset or even can test a particular bit. These instructions include : Logical instructions: NOT, AND, OR, XOR and Test. FORMAT Example Comments Flags Affected NOT Source (R/M) MOV BL, 35h NOT BL BL=00110101 BL= 11001010 AND (R/M), Imm./ R/M MOV AL, 35h AND AL, 0Fh AL=00110101 AL=AL.0Fh= 00000101 CF=OF=0, AF=? PF, SF, ZF updated OR (R/M), Imm./ R/M MOV BL, 22h MOV CL, FFh OR BL, CL BL=00010110 CL=11111111 BL=BL+CL=11111111 CF=OF=0, AF=? PF, SF, ZF updated XOR (R/M), Imm./ R/M MOV AL, 55h XOR AL, FAh AL=01010101 AL xor FAh=10100111 CF=OF=0, AF=? PF, SF, ZF updated TEST R?M, Imme/R/M MOV AL, 51h TEST AL, 80h AL=01010001 Test AL,80 test if the MSB is 0 or not; if msb is zer0 Z flag will be set. CF=OF=0, AF=? PF, SF, ZF updated 2. Shift and Rotate operation These instructions are