8085 Program to Convert Gray to Binary

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24

1K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will convert gray code to binary code.Problem StatementWrite an assembly language program for 8085 to convert gray code to binary code. The data is stored at address 8200H & store the result at memory location 8201H.DiscussionHere we are loading the number from memory and in each step we are performing right shift, and XOR the intermediate result with the previous one. Thus we are getting the result. In the following demonstration you can get the logic.C       1110 1011    (A) (EBH) 07H     0111 ... Read More

MySQL: Pull Results Matching 3 Out of 4 Expressions

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

89 Views

You can use CASE statement to get the results that match some expressions−SELECT *FROM yourTableName WHERE CASE WHEN yourColumnName1 = yourValue1 THEN 1 ELSE 0 END +    CASE WHEN yourColumnName2 = yourValue2 THEN 1 ELSE 0 END +    CASE WHEN yourColumnName3 = yourValue3 THEN 1 ELSE 0 END +    .    . CASE WHEN yourColumnNameN = yourValueN THEN 1 ELSE 0 END > = 3;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table UserInformation    -> (    -> Id int NOT NULL AUTO_INCREMENT, ... Read More

What is Elliptic Curve Cryptography

Ridhi Arora
Updated on 30-Jul-2019 22:30:24

13K+ Views

Elliptic curve cryptography is used to implement public key cryptography. It was discovered by Victor Miller of IBM and Neil Koblitz of the University of Washington in the year 1985. ECC popularly used an acronym for Elliptic Curve Cryptography. It is based on the latest mathematics and delivers a relatively more secure foundation than the first generation public key cryptography systems for example RSA.Elliptic CurvesIn 1985, cryptographic algorithms were proposed based on elliptic curves. An elliptic curve is the set of points that satisfy a specific mathematical equation. They are symmetrical.UsesWebsites make extensive use of ECC to secure customers’ hypertext ... Read More

Stop a Running MySQL Query

Chandu yadav
Updated on 30-Jul-2019 22:30:24

728 Views

In order to stop a running MySQL query, we can use the KILL command with process id. The syntax is as follows −kill processId;Or you can stop a running MySQL query with the help of below syntax −call mysql.rds_kill(queryId);Let us first get the processId with the help of show command. The query is as follows −mysql> show processlist;Here is the output with the list of processes −+----+-----------------+-----------------+----------+---------+--------+------------------------+------------------+ | Id |  User           | Host            | db       | Command | Time   | State           ... Read More

Replace Values of SELECT Return in MySQL

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

1K+ Views

You can use select case statement for this. The syntax is as follows.select yourColumnName1, yourColumnName2, ...N, case when yourColumnName=1 then 'true' else 'false' end as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The query to create a table is as follows.mysql> create table selectReturnDemo -> ( -> Id int, -> Name varchar(100), -> isGreaterthan18 tinyint(1) -> ); Query OK, 0 rows affected (0.62 sec)Now you can insert some records in the table using insert command. The query is as follows.mysql> insert into selectReturnDemo values(1, 'Carol', 0); Query OK, 1 row affected (0.23 sec) mysql> ... Read More

Use ListIterator to Traverse an ArrayList in Forward Direction in Java

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

228 Views

A ListIterator can be used to traverse the elements in the forward direction as well as the reverse direction in the List Collection. So the ListIterator is only valid for classes such as LinkedList, ArrayList etc.The method hasNext( ) in ListIterator returns true if there are more elements in the List and false otherwise. The method next( ) returns the next element in the List and advances the cursor position.A program that demonstrates this is given as follows −Example Live Demoimport java.util.ArrayList; import java.util.ListIterator; public class Demo {    public static void main(String[] args) {       ArrayList aList = ... Read More

Limit Excessive Use of Mobile

Ridhi Arora
Updated on 30-Jul-2019 22:30:24

122 Views

Today’s age is a technology-driven age. Mobile phones are the most used gadget at the moment. Be it rich or poor, young or old, mobiles have become a part and parcel for each one of us. However, the cell phone has a lot of adverse effects like back pain, stress, irritation, and depression, radiations harming us leading to different nervous disorders and the others.Limiting Mobile Phone UsagePlace the phone down on a hard surface if one is texting. One can even hold the phone in one hand and text with the other. This will increase the time of texting and ... Read More

Barrier Objects in Python

Samual Sam
Updated on 30-Jul-2019 22:30:24

525 Views

Barrier provides one of the python synchronization technique with which single or multiple threads wait until a point in a set of activities and make progress together.To define a barrier object, “threading. Barrier” is used.threading.Barrier(parties, action = None, timeout = None)Where, parties = Number of threadsaction = called by one of the threads when they are released.timeout = Default timeout value. In case no timeout value is specified for the wait(), this timeout value is used.Below mentioned methods are used by Barrier class.Sr.NoMethod & Description1partiesA number of threads required to reach the common barrier point.2n_waitingNumber of threads waiting in the ... Read More

Encrypt MS Word Files

yashwanth sitamraju
Updated on 30-Jul-2019 22:30:24

659 Views

A procedure should be followed for encrypting an MS word document. Encryption is nothing but protecting your document from a third party. First, let us look into the definition of encryption.What is Encryption? How do we use Encryption?The word encryption is derived from the Greek word Kryptos means hidden or a secret.There are certain algorithms to use encryption like RSA algorithms and Diffie-Hellman key exchange algorithms.These algorithms led to the use of encryption in commercial and consumer realms to protect data.The password is the best example of encryption.Encryption is used in sending data across all the networks and ATM is ... Read More

Update MySQL Date and Increment by One Year

Chandu yadav
Updated on 30-Jul-2019 22:30:24

1K+ Views

You can use in-built function date_add() from MySQL. The syntax is as follows −UPDATE yourTableName SET yourDateColumnName=DATE_ADD(yourDateColumnName, interval 1 year);To understand the above syntax, let us first create a table. The query to create a table is as follows −mysql> create table UpdateDate -> ( -> Id int, -> DueDate datetime -> ); Query OK, 0 rows affected (0.76 sec)Insert some records in the table using insert command. The query to insert record is as follows −mysql> insert into UpdateDate values(1001, '2012-5-21'); Query OK, 1 row affected (0.17 ... Read More

Advertisements