George John has Published 1234 Articles

Addressing modes of 8051

George John

George John

Updated on 31-Oct-2023 04:34:24

115K+ Views

In this section, we will see different addressing modes of the 8051 microcontrollers. In 8051 there are 1-byte, 2-byte instructions and very few 3-byte instructions are present. The opcodes are 8-bit long. As the opcodes are 8-bit data, there are 256 possibilities. Among 256, 255 opcodes are implemented.The clock frequency ... Read More

How do I find the length of an array in C/C++?

George John

George John

Updated on 31-Oct-2023 02:49:20

19K+ Views

Some of the methods to find the length of an array are given as follows −Method 1 - Using sizeof operatorThe sizeof() operator can be used to find the length of an array. A program that demonstrates the use of the sizeof operator in C++ is given as follows.Example Live Demo#include ... Read More

Access last inserted row in MySQL?

George John

George John

Updated on 04-Oct-2023 21:31:33

23K+ Views

If you are AUTO_INCREMENT with column, then you can use last_insert_id() method. This method gets the ID of the last inserted record in MySQL. The syntax is as follows SELECT LAST_INSERT_ID(); To understand the above syntax, let us create a table. The query to create a table is as follows ... Read More

Standard header files in C

George John

George John

Updated on 04-Oct-2023 12:26:13

24K+ Views

In C language, header files contain the set of predefined standard library functions. The "#include" preprocessing directive is used to include the header files with ".h" extension in the program. Here is the table that displays some of the header files in C language, ... Read More

Show MySQL host via SQL Command?

George John

George John

Updated on 14-Sep-2023 21:09:02

25K+ Views

To display MySQL host via SQL command, use system variable "hostname".The following is the query to display the host −mysql> select @@hostname;Here is the output −+-----------------+ | @@hostname | +-----------------+ | DESKTOP-QN2RB3H | +-----------------+ 1 row in set (0.00 sec)Or you can use "show variables" ... Read More

8255 microprocessor operating modes

George John

George John

Updated on 14-Sep-2023 21:04:57

24K+ Views

The 8255 is a general purpose programmable IO device. It is designed to interface the CPU with some external devices like ADC, DAC, keyboard etc. We can program the device according to the given condition.There are three 8-bit bi-directional IO ports. The Port-A, Port-B, and Port-C. These ports are assigned ... Read More

Interfacing DAC with 8051 Microcontroller

George John

George John

Updated on 14-Sep-2023 15:43:06

28K+ Views

In this section we will see how DAC (Digital to Analog Converter) using Intel 8051 Microcontroller. We will also see the sinewave generation using DAC.The Digital to Analog converter (DAC) is a device, that is widely used for converting digital pulses to analog signals. There are two methods of converting ... Read More

Print a 2D Array or Matrix in Java

George John

George John

Updated on 14-Sep-2023 01:39:23

26K+ Views

In this post we will try to print an array or matrix of numbers at console in same manner as we generally write on paper.For this the logic is to access each element of array one by one and make them print separated by a space and when row get ... Read More

C++ Program to Implement Stack using linked list

George John

George John

Updated on 14-Sep-2023 01:28:41

33K+ Views

A stack is an abstract data structure that contains a collection of elements. Stack implements the LIFO mechanism i.e. the element that is pushed at the end is popped out first. Some of the principle operations in the stack are −Push - This adds a data value to the top ... Read More

Get the index of a particular element in an ArrayList in Java

George John

George John

Updated on 13-Sep-2023 14:48:25

25K+ Views

The index of a particular element in an ArrayList can be obtained by using the method java.util.ArrayList.indexOf(). This method returns the index of the first occurrence of the element that is specified. If the element is not available in the ArrayList, then this method returns -1.A program that demonstrates this ... Read More

Advertisements