Subtract Two 8-bit Numbers in 8051

Arjun Thakur
Updated on 27-Jun-2020 12:50:36

13K+ Views

Here we will see how to subtract two 8-bit numbers using this microcontroller. The register A(Accumulator) is used as one operand in the operations. There are seven registers R0 – R7 in different register banks. We can use any of them as the second operand.We are taking two number73H and BDH at location 20H and 21H, After subtracting the result will be stored at location 30H and 31H.  AddressValue...20H73H21HBDH...30H00H31H00H...ProgramMOVR0, #20H;set source address 20H to R0 MOVR1, #30H;set destination address 30H to R1 MOVA, @R0;take the value from source to register A MOVR5, A; Move the value from A to ... Read More

Multiply Two 8-Bit Numbers in 8051

Ankith Reddy
Updated on 27-Jun-2020 12:50:12

22K+ Views

Now we will try to multiply two 8-bit numbers using this 8051 microcontroller. The register A and B will be used for multiplication. No other registers can be used for multiplication. The result of the multiplication may exceed the 8-bit size. So the higher order byte is stored at register B, and lower order byte will be in the Accumulator A after multiplication.We are taking two number FFH and FFH at location 20H and 21H, After multiplying the result will be stored at location 30H and 31H.  AddressValue...20HFFH21HFFH...30H00H31H00H...Program        MOV R0, #20H;set source address 20H to R0   ... Read More

Override Private or Static Method in Java

Nancy Den
Updated on 27-Jun-2020 12:48:55

9K+ Views

No, we cannot override private or static methods in Java.Private methods in Java are not visible to any other class which limits their scope to the class in which they are declared.ExampleLet us see what happens when we try to override a private method − Live Democlass Parent {    private void display() {       System.out.println("Super class");        } } public class Example extends Parent {    void display() // trying to override display() {       System.out.println("Sub class");    }    public static void main(String[] args) {       Parent obj = new Example(); ... Read More

8051 Program to Divide Two 8-Bit Numbers

George John
Updated on 27-Jun-2020 12:48:19

11K+ Views

Now we will see another arithmetic operation. The divide operation to divide two 8-bit numbers using this 8051 microcontroller. The register A and B will be used in this operation. No other registers can be used for division. The result of the division has two parts. The quotient part and the remainder part. Register A will hold Quotient, and register B will hold Remainder.We are taking two number0EH and 03H at location 20H and 21H, After dividing the result will be stored at location 30H and 31H.  AddressValue...20H0EH21H03H...30H00H31H00H...ProgramMOV R0, #20H;set source address 20H to R0 MOV R1, #30H;set destination address ... Read More

Forward Error Correction (FEC)

Nishtha Thakur
Updated on 27-Jun-2020 12:47:33

18K+ Views

Forward error correction (FEC) is an error correction technique to detect and correct a limited number of errors in transmitted data without the need for retransmission.In this method, the sender sends a redundant error-correcting code along with the data frame. The receiver performs necessary checks based upon the additional redundant bits. If it finds that the data is free from errors, it executes error-correcting code that generates the actual frame. It then removes the redundant bits before passing the message to the upper layers.Advantages and DisadvantagesBecause FEC does not require handshaking between the source and the destination, it can be ... Read More

Interfacing 8279 Keyboard with 8085 Microprocessor

Chandu yadav
Updated on 27-Jun-2020 12:47:23

2K+ Views

Here we will see how 8279 Chip can be used to interface a matrix keyboard with 8085 microprocessors. This chip can be used either keyboard/display interfacing mode or as a strobed input port. But generally, it is used as keyboard interfacing.The keyboard interfacing schemes can also be divided into two modes. These modes are Decoded mode of operationEncoded mode of operationDecoded Mode of OperationIn this mode, the matrix keyboard can have only four rows. These four rows can be selected by using SL3-0 select lines. There are eight columns. These can be selected using RL7-0 these eight column lines. So there are ... Read More

Parse Date and Time in Java

Samual Sam
Updated on 27-Jun-2020 12:47:00

268 Views

Create a SimpleDateFormat object −SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss");Do not forget to import the following package for SimpleDateFormat class −import java.text.SimpleDateFormat;Now, since we have set the format for date above, let us parse the date using parseObject() method −Date dt = (Date) dateFormat.parseObject("2018.11.22.11.50.15");The following is an example −Example Live Demoimport java.util.Date; import java.text.SimpleDateFormat; public class Demo {    public static void main(String[] argv) throws Exception {       SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss");       // parse       System.out.println("Parse Date and Time...");        Date dt = (Date) dateFormat.parseObject("2018.11.22.11.50.15");       System.out.println(dt);    } }OutputParse ... Read More

Interfacing 8279 Display with 8085 Microprocessor

George John
Updated on 27-Jun-2020 12:45:47

4K+ Views

The Intel 8279 is used for keyboard interfacing but it can also be used for multiplexed 7-segment LED display interfacing. To display a character into 7-segment display we have to store 7-segment code in a display RAM location. The display RAM of this chip can store 16 bytes of data.Write to Display RAMTo write to the display RAM one special command is needed to be applied on the 8279 control port. The following pattern is showing the RAM command that is written to the control port of 8279.100AiAAAAThe first three bits are 100. It indicates ‘ Write to Display RAM’command. ... Read More

Parse String Date Time Value Input in Java

karthikeya Boyini
Updated on 27-Jun-2020 12:44:32

381 Views

In Java, you can parse string date time value input usingSimpleDateFormat("E, dd MMM yyyy HH:mm:ss Z");We have used the above class since we imported the following package −import java.text.SimpleDateFormat;Now, we can display the date in the same format −Date dt = (Date) dateFormatter.parseObject("Tue, 20 Nov 2018 16:10:45 -0530");The following is an example −Example Live Demoimport java.text.Format; import java.text.SimpleDateFormat; import java.util.Date; public class Main {    public static void main(String[] argv) throws Exception {       Format dateFormatter = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss Z");       Date dt = (Date) dateFormatter.parseObject("Tue, 20 Nov 2018 16:10:45 -0530");     ... Read More

Binary Convolutional Code in Error Correcting Codes

Nancy Den
Updated on 27-Jun-2020 12:44:02

13K+ Views

Errors and Error Correcting CodesErrors occurs when bits get corrupted while transmission over the computer network, due to interference and network problems.Error-correcting codes (ECC) are a sequence of numbers generated by specific algorithms for detecting and removing errors in data that has been transmitted over noisy channels. Error correcting codes ascertain the exact number of bits that has been corrupted and the location of the corrupted bits, within the limitations in algorithm.ECCs can be broadly categorized into two types, block codes and convolution codes.Binary Convolutional CodesIn convolutional codes, the message comprises of data streams of arbitrary length and a sequence ... Read More

Advertisements