Add Two 8-Bit BCD Numbers in 8086

Arjun Thakur
Updated on 30-Jul-2019 22:30:25

6K+ Views

In this program we will see how to add two 8-bit BCD numbers.Problem StatementWrite 8086 Assembly language program to add two 8-bit BCD number stored in memory address offset 600.DiscussionThis task is too simple. Here we are taking the numbers from memory and after adding we need to put DAA instruction to adjust the accumulator content to decimal form. The DAA will check the AC and CY flags to adjust a number to its decimal form.InputAddressData……5009950125…… Flow Diagram Program OutputAddressData……6002560101…… 

SetAt0 Method for Septet Class in Java Tuples

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

117 Views

The setAt0() method is used to set the Septet value in JavaTuples and a copy with new value at the specified index i.e. index 0 here.Let us first see what we need to work with JavaTuples. To work with Septet class in JavaTuples, you need to import the following package −import org.javatuples.Septet;Note − Steps to download and run JavaTuples program. If you are using Eclipse IDE to run Septet Class in JavaTuples, then Right Click Project → Properties → Java Build Path → Add External Jars and upload the downloaded JavaTuples jar file.The following is an example −Exampleimport org.javatuples.Septet; import ... Read More

Use of JSP text Action Element

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

184 Views

The action can be used to write the template text in JSP pages and documents. Following is the simple syntax for this action −Template dataThe body of the template cannot contain other elements; it can only contain text and EL expressions (Note − EL expressions are explained in a subsequent chapter). Note that in XML files, you cannot use expressions such as ${whatever > 0}, because the greater than signs are illegal. Instead, use the gt form, such as ${whatever gt 0} or an alternative is to embed the value in a CDATA section.]]>If you need to include a ... Read More

JDBC Example for Inserting CLOB Data into a Table

Daniol Thomas
Updated on 30-Jul-2019 22:30:25

2K+ Views

Assume we already have a table named MyData in the database with the following description.+---------+--------------+------+-----+---------+-------+ | Field   | Type | Null | Key | Default | Extra | +---------+--------------+------+-----+---------+-------+ | Name | varchar(255) | YES | | NULL | | | Article | longtext | YES | | NULL | | +---------+--------------+------+-----+---------+-------+If you need to insert ... Read More

Contains Method of AbstractSequentialList in Java

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

147 Views

The contains() method of AbstractSequentialList in Java is used to check whether an element is in the Collection.The syntax is as followspublic boolean contains(Object ob)Here, ob is the element to be checked. To work with the AbstractSequentialList class in Java, you need to import the following packageimport java.util.AbstractSequentialList;The following is an example to implement AbstractSequentialList contains() method in JavaExample Live Demoimport java.util.LinkedList; import java.util.AbstractSequentialList; public class Demo { public static void main(String[] args) { AbstractSequentialList absSequential = new LinkedList(); absSequential.add(250); ... Read More

Convolutions Using Python

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

339 Views

Image recognition used to be done using much simpler methods such as linear regression and comparison of similarities. The results were obviously not very good, even the simple task of recognizing hand-written alphabets proved difficult. Convolution neural networks (CNNs) are supposed to be a step up from what we traditionally do by offering a computationally cheap method of loosely simulating the neural activities of a human brain when it perceives images.Convolutional neural network overviewVery similar to how we recognise different objects, computer algorithms need to go through millions of images before it is able to generalize the input and make ... Read More

Understanding int argc and char argv in C++

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

1K+ Views

The argc stands for argument count and argv stands for argument values. These are variables passed to main function when it starts executing. When we run a program we can give arguments to that program like:$ ./a.out helloHere hello is an argument to the executable. This can be accessed in your program.Example Code#include using namespace std; int main(int argc, char** argv) {    cout

Insert to Specific Index for MongoDB Array

George John
Updated on 30-Jul-2019 22:30:25

556 Views

To insert a specific index for MongoDB array, you can use $push operator. Let us create a collection with documents>db.insertToSpecificIndexDemo.insertOne({"StudentName":"Larry", "StudentSubjects":["MySQL", "Java"]}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9d2562a629b87623db1b2c") } >db.insertToSpecificIndexDemo.insertOne({"StudentName":"Chris", "StudentSubjects":["C++", "C"]}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9d2573a629b87623db1b2d") }Following is the query to display all documents from a collection with the help of find() method> db.insertToSpecificIndexDemo.find().pretty();This will produce the following output{    "_id" : ObjectId("5c9d2562a629b87623db1b2c"),    "StudentName" : "Larry",    "StudentSubjects" : [       "MySQL",       "Java"    ] } {    "_id" : ObjectId("5c9d2573a629b87623db1b2d"),    "StudentName" : "Chris",   ... Read More

Insert into Two Tables Using a Single MySQL Query

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

6K+ Views

You can use stored procedure to insert into two tables in a single query. Let us first create a table −mysql> create table DemoTable (    StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    StudentFirstName varchar(20) ); Query OK, 0 rows affected (0.56 sec)Here is the query to create second table −mysql> create table DemoTable2 (    ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    ClientName varchar(20),    ClientAge int ); Query OK, 0 rows affected (0.76 sec)Following is the query to create stored procedure to insert into two tables created above −mysql> DELIMITER //    mysql> CREATE PROCEDURE insert_into_twoTables(name ... Read More

Check If Any String in the List Starts With a Letter in Java

Krantik Chavan
Updated on 30-Jul-2019 22:30:25

5K+ Views

First, create a List with String elements:List myList = new ArrayList(); myList.add("pqr"); myList.add("stu"); myList.add("vwx"); myList.add("yza"); myList.add("bcd"); myList.add("efg"); myList.add("vwxy");Use the startsWith() method to check if any of the above string in the myList begins with a specific letter:myList.stream().anyMatch((a) -> a.startsWith("v"));TRUE is returned if any of the string begins with the specific letter, else FALSE.The following is an example to check if any String in the list starts with a letter:Exampleimport java.util.ArrayList; import java.util.List; public class Demo {    public static void main(final String[] args) {       List myList = new ArrayList();       myList.add("pqr");       myList.add("stu"); ... Read More

Advertisements