Instructions to Perform AND Operation in 8085 Microprocessor

Chandu yadav
Updated on 27-Jun-2020 15:00:56

3K+ Views

In 8085 Instruction set, and specially in its logical group of instructions, we have AND, OR, XOR, NOT type of instructions. 8085 does not have instructions to perform NAND, NOR, XNOR operations directly. Now let us discuss the instructions to perform AND operations only.To perform ANDing of two numbers, 8085 imposes the restriction that one of the operands must be kept in the Accumulator. The other operand can be at any one of the following possible locations −ClassificationsExamplesThe other operand can be kept in 8-bit immediate data in the instruction.ANI 43HANI FFHThe other 8-bit operand can be kept in a ... Read More

Instructions to Perform OR Operation in 8085 Microprocessor

Chandu yadav
Updated on 27-Jun-2020 15:00:21

1K+ Views

In 8085 Instruction set, and specially in its logical group of instructions, we have AND, OR, XOR, NOT type of instructions. 8085 does not have instructions to perform NAND, NOR, XNOR operations directly. Now let us discuss the instructions to perform OR operations only.To perform ORing of two numbers, 8085 imposes the restriction that one of the operands must be kept in the Accumulator. The other operand can be at any one of the following possible locations −ClassificationsExamplesThe other operand can be kept in 8-bit immediate data in the instruction.ORI 43HORI FFHThe other 8-bit operand can be kept in a ... Read More

Python Object Serialization with Pickle

Krantik Chavan
Updated on 27-Jun-2020 15:00:01

1K+ Views

The term object serialization refers to process of converting state of an object into byte stream. Once created, this byte stream can further be stored in a file or transmitted via sockets etc. On the other hand reconstructing the object from the byte stream is called deserialization.Python’s terminology for serialization and deserialization is pickling and unpickling respectively. The pickle module available in Python’s standard library provides functions for serialization (dump() and dumps()) and deserialization (load() and loads()).The pickle module uses very Python specific data format. Hence, programs not written in Python may not be able to deserialize the encoded (pickled) ... Read More

Pprint Module - Data Pretty Printer

Daniol Thomas
Updated on 27-Jun-2020 14:59:38

2K+ Views

The pprint module (lib/pprint.py) is a part of Python’s standard library which is distributed along with standard Python distribution. The name pprint stands for pretty printer. The pprint module’s functionality enables aesthetically good looking appearance of Python data structures. Any data structure that can be correctly parsed by Python interpreter is elegantly formatted. The formatted expression is kept in one line as far as possible, but breaks into multiple lines if the length exceeds the width parameter of formatting. One unique feature of pprint output is that the dictionaries are automatically sorted before the display representation is formatted.The pprint module ... Read More

Perform Exclusive OR Operation in 8085 Microprocessor

Arjun Thakur
Updated on 27-Jun-2020 14:57:02

2K+ Views

In 8085 Instruction set, and specially in its logical group of instructions, we have AND, OR, XOR, NOT type of instructions. 8085 does not have instructions to perform NAND, NOR, XNOR operations directly. Now let us discuss the instructions to perform XOR operations only.To perform XORing of two numbers, 8085 imposes the restriction that one of the operands must be kept in the Accumulator. The other operand can be at any one of the following possible locations −ClassificationsExamplesThe other operand can be kept in 8-bit immediate data in the instruction.XRI 43HXRI FFHThe other 8-bit operand can be kept in a ... Read More

Complement Accumulator in 8085 Microprocessor

Ankith Reddy
Updated on 27-Jun-2020 14:56:14

8K+ Views

In 8085 Instruction set, logical type there is one complement instruction with the mnemonic CMA. It actually stands for “CoMplement the Accumulator”. It performs1's complement operation on the current contents of Accumulator, and the result is stored back in the Accumulator replacing its previous contents. It is to be noted that, there are no other instructions tocomplement any other register’s contents. Though it is a logicaltype of instruction, Flag bits are not affected by the execution of this instruction. It occupies only 1 Byte in memory. Mnemonics, OperandOpcode(in HEX)BytesCMA2F1Let us suppose that example, the initial content of Accumulator is AAH i.e. ... Read More

Complement Set CY Flag in 8085 Microprocessor

George John
Updated on 27-Jun-2020 14:55:44

1K+ Views

In 8085 Instruction set, there are two instructions to control the Cy flag bit content. Thesemnemonics are STC and CMC. Both are 1-Byteinstructions. There hex codes are given in the following table – Mnemonics, OperandOpcode(in HEX)BytesSTC371CMC3F1Using STC instruction we can set the Cy flag bit to 1 irrespective of itsprevious value. And using CMC instruction we can complement the current value of the Cy fag bit andresult will update the current Cy flag bit value. Here STC stands for “SeT the Carry flag” and CMC stands for “CoMplement the Carry flag”. Note that, there isno dedicated instruction in 8085 instruction set ... Read More

Compare Operation in 8085 Microprocessor

Chandu yadav
Updated on 27-Jun-2020 14:53:44

911 Views

In 8085 Instruction set, we are having a set of instructions to perform compare operation where we shall compare two operands, and which will affect the status flags values depending on the result of the comparison. In this operation, 8085 imposes the restriction that one of the operands must be in the Accumulator. The other operand can be one of the following –ClassificationsExamplesThe other operand can be kept in 8-bit immediate data in the instruction.CPI 43HCPI FFHThe other 8-bit operand can be kept in a memory location and whose memory address will be pointed by HL register pair.CMP MThe other ... Read More

Display First Two Digits of Year in Java - Two Digit Century

Samual Sam
Updated on 27-Jun-2020 14:53:05

499 Views

Use the ‘C’ date conversion character to display two digits of year −System.out.printf("Two-digit Year (Century Name) = %tC/%TC", d, d);Above, d is a date object −Date d = new Date();The following is an example −Example Live Demoimport java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; public class Demo {    public static void main(String[] args) throws Exception {       Date d = new Date();       DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss a");       String format = dateFormat.format(d);       System.out.println("Current date and time = " + format);       System.out.printf("Localized day name = %tA/%TA", d, d); ... Read More

Display Four-Digit Year in Java

karthikeya Boyini
Updated on 27-Jun-2020 14:52:32

796 Views

Use the ‘Y’ date conversion character to display four-digit year.System.out.printf("Four-digit Year = %TY",d);Above, d is a date object −Date d = new Date();The following is an example −Example Live Demoimport java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; public class Demo {    public static void main(String[] args) throws Exception {       Date d = new Date();       DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss a");       String format = dateFormat.format(d);       System.out.println("Current date and time = " + format);       System.out.printf("Four-digit Year = %TY",d);    } }OutputCurrent date and time = 26/11/2018 11:56:26 AM Four-digit Year = 2018

Advertisements