Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
Misc
7.8K+ articles
Bit Magic
821+ articles
Computer Organization & Architecture
744+ articles
Bitwise-XOR
443+ articles
microprocessor
233+ articles
system-programming
201+ articles
binary-representation
154+ articles
base-conversion
93+ articles
complement
21 posts
Recent Articles
Popular Articles
String obtained by reversing and complementing a Binary string K times
Last Updated: 12 July 2025
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 string:If the operation number is odd, then rever...
read more
Strings
Bit Magic
DSA
binary-string
Reverse
complement
Lucky alive person in a circle | Set - 2
Last Updated: 11 July 2025
Given that N person (numbered 1 to N) standing to form a circle. They all have the gun in their hand which is pointed to their leftmost Partner.Everyone shoots such that 1...
read more
DSA
binary-string
binary-representation
complement
Complement of a number with any base b
Last Updated: 11 July 2025
In this post, a general method of finding complement with any arbitrary basebis discussed.Remember: It is recommended to go through below as follows:One’s Complement of an...
read more
DSA
base-conversion
complement
10's Complement of a decimal number
Last Updated: 11 July 2025
Given a decimal number N. The task is to find 10’s complement of the number N.Example:Input : 25Output : 10's complement is : 75Input : 456Output : 10's complement is : 54...
read more
Misc
Mathematical
DSA
school-programming
math
Numbers
complement
Subtraction of two numbers using 2's Complement
Last Updated: 13 March 2023
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 of Positive Numbers.For exa...
read more
DSA
school-programming
Algorithms-Bit Algorithms
Bit Algorithms
complement
Check if bits in range L to R of two numbers are complement of each other or not
Last Updated: 11 July 2025
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 the range l to r in both the given nu...
read more
Bit Magic
DSA
Bitwise-XOR
Algorithms-Bit Algorithms
complement
Interface 8255 with 8085 microprocessor for 1’s and 2’s complement of a number
Last Updated: 29 April 2023
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 t...
read more
Computer Organization & Architecture
system-programming
microprocessor
complement
EnumSet complementOf() Method in Java
Last Updated: 03 October 2018
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 pr...
read more
Misc
Java
java-EnumSet
complement
Previous number same as 1's complement
Last Updated: 17 May 2021
Given a number check whether binary representation of its predecessor and its 1's complement are same or not.Examples:Input : 14Output : NOStoring 14 as a 4 bit number, 14...
read more
DSA
base-conversion
complement
8085 program to find 2's complement of the contents of Flag Register
Last Updated: 03 October 2018
Problem – Write an assembly language program in 8085 microprocessor to find 2's complement of the contents of Flag Register.Example - Algorithm –Initialize the value of St...
read more
Computer Organization & Architecture
system-programming
microprocessor
complement
8085 programs to find 2's complement with carry | Set 2
Last Updated: 11 July 2025
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 is taken as 2000.Example -...
read more
Computer Organization & Architecture
system-programming
microprocessor
complement
8085 program to find 1’s and 2’s complement of 16-bit number
Last Updated: 11 July 2025
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 of 16-bit number where starting addre...
read more
Computer Organization & Architecture
system-programming
microprocessor
complement
8085 program to find 1's and 2's complement of 8-bit number
Last Updated: 07 May 2023
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 3000 memory address and store result in...
read more
Computer Organization & Architecture
system-programming
microprocessor
complement
Find relative complement of two sorted arrays
Last Updated: 02 December 2023
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 - arr2 which means that we need to find all ...
read more
Misc
Searching
DSA
Arrays
complement
Find One's Complement of an Integer
Last Updated: 30 January 2023
Given an integer n, find the one's complement of the integer.Examples:Input : n = 5Output : 2Input : n = 255Output : 0Input : n = 26Output : 5Recommended PracticeOne's ...
read more
Misc
Bit Magic
Mathematical
DSA
Bitwise-XOR
complement
1
2
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !