Nancy Den has Published 330 Articles

C++ Program to Find the GCD and LCM of n Numbers

Nancy Den

Nancy Den

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

3K+ Views

This is the code to find out the GCD and LCM of n numbers. The GCD or Greatest Common Divisor of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers. GCD is also known as Greatest Common Factor.The least ... Read More

C++ Program to Generate Prime Numbers Between a Given Range Using the Sieve of Sundaram

Nancy Den

Nancy Den

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

382 Views

This is C++ program to implement Sieve of Sundaram to Generate Prime Numbers Between Given Range. This algorithm was discovered in 1934 by Sundaram.AlgorithmBegin printPrimes(n) Here we find out primes smaller than n, we reduce n-2 to half. We call it ... Read More

Description of 8255 PPI

Nancy Den

Nancy Den

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

6K+ Views

Intel 8255 is a peripheral interface (PPI) chip which is programmable. It is used for the connection of peripheral devices and interfacing. We call Peripheral device also as Input Output device. We use Input Output ports for the connection of Input Output devices. Hence 8255 is a programmable Input Output ... Read More

C++ Program to Perform Fermat Primality Test

Nancy Den

Nancy Den

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

698 Views

Fermat Primality test performs to check a given number is prime or not. Here is a C++ code of this algorithm.AlgorithmBegin    modulo(base, e, mod)    a = 1    b = base    while (e > 0)       if (e mod 2 == 1)       ... Read More

C++ Program to Implement Booth’s Multiplication Algorithm for Multiplication of 2 signed Numbers

Nancy Den

Nancy Den

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

2K+ Views

Booth’s algorithm is a multiplication algorithm that multiplies two signed binary numbers in 2’s compliment notation. Booth used desk calculators that were faster at shifting than adding and created the algorithm to increase their speed.AlgorithmBegin    Put multiplicand in BR and multiplier in QR       and then the ... Read More

Operational modes of 8255

Nancy Den

Nancy Den

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

2K+ Views

There are three modes of operation which are supported by 8255. We call them as mode 0, mode1 and mode 2.We call the mode 0 as the simple Input Output or the basic Input Output for performing the simplest mode of operation. Every ports of 8255 can be programmed to ... Read More

IntStream sequential() method in Java

Nancy Den

Nancy Den

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

296 Views

The sequential() method of the IntStream class in Java is used to return a sequential IntStream. The syntax is as follows:IntStream sequential()First, create an IntStream and elements in a range using the range() method:IntStream intStream1 = IntStream.range(11, 21);Now, for a sequential IntStream, use the sequential() method like this:IntStream intStream2 = ... Read More

LongStream min() method in Java

Nancy Den

Nancy Den

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

65 Views

The min() method of the LongStream class in Java returns an OptionalLong describing the minimum element of this stream, or an empty optional if this stream is empty.The syntax is as follows:OptionalLong min()Here, OptionalLong is a container object which may or may not contain a long value.To use the LongStream ... Read More

Control port of 8255

Nancy Den

Nancy Den

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

5K+ Views

In 8255, there are two types of command words or control word are available. And they are −Mode definition control word andPort C bit set/reset control word.Both these are written to the control port only. From the point of view of the microprocessor there is a single 8-bit control port, ... Read More

What is ResultSetMetaData in JDBC? What is its significance?

Nancy Den

Nancy Den

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

4K+ Views

The ResultSetMetaData provides information about the obtained ResultSet object like, the number of columns, names of the columns, datatypes of the columns, name of the table etc…Following are some methods of ResultSetMetaData class.MethodDescriptiongetColumnCount()Retrieves the number of columns in the current ResultSet object.getColumnLabel()Retrieves the suggested name of the column for use.getColumnName()Retrieves ... Read More

Advertisements