Now let us see a program of Intel 8085 Microprocessor. This program will find the multiplication result of two BCD numbers.Problem StatementWrite 8085 Assembly language program to find two BCD number multiplication. The numbers are stored at location 8000H and 8001H.DiscussionIn this program the data are taken from 8000H and 8001H. The result is stored at location 8050H and 8051H. As we know that 8085 has no multiply instruction so we have to use repetitive addition method. In this process after each addition we are adjusting the accumulator value to get decimal equivalent. When carry is present, we are incrementing the ... Read More
In android using implicit intent, we can send data with other applications using ACTION_SEND action. We have to call Intent.createChooser() to open default chooser of android mobile to send the data. it may same or different in Android mobiles.This example demonstrates how to share app data with other applications in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. In the above code, it contains textview, when user clicks on text view ... Read More
The name of the parent directory of the file or directory can be obtained using the method java.io.File.getParent(). This method returns the parent directory pathname string or null if there is no parent named.A program that demonstrates this is given as follows −Example Live Demoimport java.io.File; public class Demo { public static void main(String[] args) { File file = new File("C:" + File.separator + "JavaProgram" + File.separator, "demo1.txt"); System.out.println("File: " + file); System.out.println("Parent: " + file.getParent()); } }The output of the above program is as follows −OutputFile: C:\JavaProgram\demo1.txt Parent: C:\JavaProgramNow ... Read More
Let us set a radix here as.// radix int r = 32;Include the radix here as a BigInteger constructor.BigInteger one = new BigInteger("vv", r);Now get its string representation −String strResult = one.toString(radix);The following is an example −Example Live Demoimport java.math.*; public class Demo { public static void main(String[] args) { // radix int r = 32; BigInteger one = new BigInteger("vv", r); String strResult = one.toString(r); System.out.println(strResult); } }Outputvv
Now let us see a program of Intel 8085 Microprocessor. This program will calculate the multiplication of two 16-bit numbers.Problem StatementWrite 8085 Assembly language program to multiply two 16-bit numbers stored at 8000H -8001H and 8002H - 8003H.DiscussionThis program takes the 16 bit data from memory location 8000H – 8001Hand 8002H – 8003H. The 32 bit results are stored at location 8050H– 8053H.Here we have tested with two 16 bit numbers. The results are as follows 1111H × 1111H = 01234321H 1C24H × 0752H = 00CDFF88HInputfirst inputAddressData......800011800111800211800311......second input AddressData......80002480011C800252800307......Flow DiagramProgramAddressHEXCodesLabelsMnemonicsCommentsF00031, 00, 20LXI SP, 2000H InitializeStack pointerF0032A, 00, ... Read More
Jonathan Swift, the famous satirist of English Literature, wrote 'The Battle of the Books' in 1697. It is a classic prose piece depicting the battle between Moderns and Ancients books using the allegorical example of A Spider and A Bee. The prose is a parody of heroic poetry along the lines of Samuel Butler's parody of battle in Hudibras.Description of Battle of Books by SwiftThe battle began when the Moderns, occupying the lower of the two tops of the hill Parnassus, grew furious over the Ancients on the higher one. The Moderns offered to exchange places so that they could ... Read More
The ftp_raw() function is used to sends raw command to the FTP server.Syntaxftp_raw(con, command)Parameterscon − The FTP connectioncommand − The command to executeReturnThe ftp_raw() function returns the server's response as an array of strings.ExampleThe following is an example −
The name of the specified file or directory can be obtained using the method java.io.File.getName(). The getName() returns the name of the file or the directory and it requires no parameters.A program that demonstrates this is given as follows −Example Live Demoimport java.io.File; public class Demo { public static void main(String[] args) { File file = new File("C:" + File.separator + "JavaProgram" + File.separator, "demo1.txt"); System.out.println("File name: " + file.getName()); } }The output of the above program is as follows −OutputFile name: demo1.txtNow let us understand the above program.The name of the specified ... Read More
First, create a BigInteger.BigInteger val = new BigInteger("198");Let us convert it to Binary, with radix as 2.val.toString(2);Convert it to Octal, with radix as 8.val.toString(8);Convert it to HexaDecimal, with radix as 16.val.toString(16);The following is an example −Example Live Demoimport java.math.BigInteger; public class Main { public static void main(String[] args) { BigInteger val = new BigInteger("198"); System.out.println("Value: " + val); // binary System.out.println("Converted to Binary: " + val.toString(2)); // octal ... Read More
Reading enhances thinking and creativity and hence, it is very important to choose the right books that help in developing positive thoughts in your mind.Following are some of the best sellers in the world of books that are popularly read for the depth of their content:Sapiens- A Brief History of HumankindSapiens has become a popular book, especially among the entrepreneurs today. Yuval Noah Harari traces the journey of the evolution of man and his contribution along with different theories propagated by anthropologists. The depth of knowledge in this book is a commendable work and the journey of over 70, 000 ... Read More