Instruction Type SUB R in 8085 Microprocessor

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

5K+ Views

In 8085 Instruction, SUB is a mnemonic that stands for ‘SUBtract contents of R from Accumulator. Here R stands for any of the following registers, or memory location M pointed by HL pair. R = A, B, C, D, E, H, L, or M Mnemonics, Operand Opcode(in HEX) Bytes SUB A 97 1 SUB B 90 1 SUB C 91 1 SUB D 92 1 SUB E 93 1 SUB H 94 1 SUB L 95 1 SUB M ... Read More

Different Ways to Start a Task in C#

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

9K+ Views

To start a task in C#, follow any of the below given ways. Use a delegate to start a task. Task t = new Task(delegate { PrintMessage(); }); t.Start(); Use Task Factory to start a task. Task.Factory.StartNew(() => {Console.WriteLine("Welcome!"); }); You can also use Lambda. Task t = new Task( () => PrintMessage() ); t.Start();

Python Program for Multiplication of Two Matrices

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

20K+ Views

Given two user input matrix. Our task is to display the addition of two matrix. In these problem we use nested List comprehensive. Algorithm Step1: input two matrix. Step 2: nested for loops to iterate through each row and each column. Step 3: take one resultant matrix which is initially contains all 0. Then we multiply each row elements of first matrix with each elements of second matrix, then add all multiplied value. That is the value of resultant matrix. Example Code # Program to multiply two matrices A=[] n=int(input("Enter N for N x N matrix: ")) ... Read More

Generate Secure Random Numbers for Managing Secrets Using Python

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

395 Views

To generate secure random numbers cryptographically we can use the secrets module in python. This module is helpful to create secure password, account authentication, security tokens or some related secrets. To use the classes and modules of the secrets module, we should import that module into our code. import secrets Random Numbers The secrets module is used to access some secure source of randomness. That is provided by the operating systems. Classes and functions, related to random numbers of the secrets modules are − Class secrets.SystemRandom It is a class to generate random numbers, by using some highest ... Read More

Convenient Web Browser Controller in Python

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

1K+ Views

To display web based documents to users by using python, there is a module called webbrowser. It provides high level interface to handle web documents. On UNIX based system, this module supports lynx, Netscape, Mosaic etc browsers. For Windows and Macintosh, it uses the standard browsers. To use this module, we need to import the following module. import webbrowser The webbrowser module has different methods, and exceptions, these are as follows − Exception webbrowser.Error This error will raise when there is an error in the webbrowser interface. Method webbrowser.open(url, new=0, autoraise=True) This method is used to display the ... Read More

Calculate BMI (Body Mass Index) Using Python

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

1K+ Views

We have to enter our height and weight. Our task is to calculate BMI using formula. Algorithm Step 1: input height and weight of your body. Step 2: then applying the formula for calculation BMI. Step 3: display BMI. Example Code height = float(input("Enter your height(m): ")) weight = float(input("Enter your weight(kg): ")) print("Your BMI is: ", round(weight / (height * height), 2)) Output Enter your height (m): 5.8 Input your weight (kg): 64 Your body mass index is: 1.9

Instruction Type SUI D8 in 8085 Microprocessor

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

3K+ Views

In 8085 Instruction set, SUI is a mnemonic that stands for ‘SUbtract Immediate from Accumulator and here d8 stands for any 8-bit or 1-Byte data. This instruction is used to subtract 8-bit immediate data from the Accumulator. The result of the subtraction will be stored in the Accumulator over witting its previous content. As it is an arithmetic instruction, so flag bits are affected based on the result. It is a 2-Byte instruction and occupies 2-Bytes in memory. Mnemonics, Operand Opcode(in HEX) Bytes SUI Data D6 2 When we issue SUI d8 instruction then ... Read More

Python Program for Addition of Two Matrices

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

12K+ Views

Given two user input matrix. Our task is to display the addition of two matrix. In these problem we use nested List comprehensive. Algorithm Step1: input two matrix. Step 2: nested for loops only to iterate through each row and columns. Step 3: At each iterationshall add the corresponding elements from two matrices and shall store the result. Example code # Program to add two matrices using nested loop A=[] n=int(input("Enter N for N x N matrix : ")) #3 here #use list for storing 2D array #get the ... Read More

Which is Faster: C++ or C#

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

281 Views

C++ is a middle-level language. It was developed by Bjarne Stroustrup in 1979. It is just an enhancement to C language and an object-oriented language. C# is modern and object-oriented language developed by Anders Hejlsberg. It is a part of the .NET framework. It is designed for Common Language Infrastructure (CLI). It is also a popular language. Difference between C++ and C# Both languages are object-oriented languages. C++ has low level of abstraction while C# has high level of abstraction. In C++, the program can be coded for any platform while in C#, the program is targeted towards windows ... Read More

Debug Class vs Debugger Class in C#

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

371 Views

To debug your code, you need methods or properties, which are provided by Debug Class in C#. The debugger class is used to set communication with the debugger. Debug Class The Debug class inherits from System.Diagnostics. The syntax is − public static class Debug The following are the properties of the debugger class. Sr.No Property & Description 1 AutoFlush Gets or sets a value stating whether Flush should be called on the Listeners or not. 2 IndentLevel The indent level is set 3 IndetntSize The number of spaces in the ... Read More

Advertisements