Given a binary string of size N and an integer K, the task is to perform K operations upon the string and print the final… Read More
Tag Archives: complement
Given that N person (numbered 1 to N) standing as to form a circle. They all have the gun in their hand which is pointed… Read More
Given a binary string, task is to convert this string in to two’s complement with the help of XOR operator. Examples: Input : 00000101Output :11111011… Read More
In this post, a general method of finding complement with any arbitrary base is discussed. Remember: It is recommended to go through below as follows: One’s… Read More
Given a decimal number N. The task is to find 10’s complement of the number N.Example: Input : 25 Output : 10's complement is :… Read More
Given two numbers a and b. The task is to subtract b from a by using 2’s Complement method.Note: Negative numbers represented as 2’s Complement… Read More
Problem-1: Find 2’s complement of an 8 bit number stored at address 2050. Result is stored at address 3050 and 3051. Starting address of program… Read More
When doing addition/subtraction on binary numbers in other representations we need to apply different logics (circuits) to perform addition and subtraction. In 2s-complement representation, we… Read More
Given two non-negative numbers a and b and two values l and r. The problem is to check whether all bits at corresponding positions in… Read More
Introduction : The 8255 is a programmable peripheral interface chip that can be interfaced with the 8085 microprocessor to perform various input/output operations. One of… Read More
The java.util.EnumSet.complementOf(Enum_Set) method is used to create an EnumSet containing elements of the same type as that of the specified Enum_Set, with the values present… Read More
Given a number check whether binary representation of its predecessor and its 1’s complement are same or not. Examples: Input : 14 Output : NO Storing 14 as… Read More
Problem – Write an assembly language program in 8085 microprocessor to find 2’s complement of the contents of Flag Register. Example – Algorithm – Initialize… Read More
Prerequisite – 8085 program to find 1’s and 2’s complement of 8-bit number Problem – – Write a program to find 1’s and 2’s complement… Read More
Problem – Write a program to find 1’s and 2’s complement of 8-bit number where starting address is 2000 and the number is stored at… Read More