## Lucky alive person in a circle | Set – 2

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 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 compliment with the help of XOR operator. Examples: Input : 00000101 Output… Read More »

One’s Complement of an Integer 1’s and 2’s complement of a Binary Number In this post, a general method of finding complement with any arbitrary… 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 and . The task is to subtract from by using 2’s Complement method. Note: Negative numbers represented as 2’s Complement of Positive… Read More »

Problem-1: Find 2’s compliment 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 »

Problem – Interface 8255 with 8085 microprocessor and write an assembly language program to display 99 in Port A, 1’s complement of 99 in Port… 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… 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 »

Given two sorted arrays arr1 and arr2 of size m and n respectively. We need to find relative complement of two array i.e, arr1 –… Read More »