Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Competitive Programming
2.3k+ articles
Algorithms
2k+ articles
Bitwise-XOR
430+ articles
Bitwise-AND
130+ articles
setBitCount
110+ articles
Bitwise-OR
110+ articles
  1. DSA
  2. >
  3. Algorithms
  4. >
  5. Bit Magic

Bit Magic

1.2k+ posts
Bits manipulation (Important tactics)
Last Updated: 07 May 2024
Prerequisites: Bitwise operators in C, Bitwise Hacks for Competitive Programming, Bit Tricks for Competitive ProgrammingTable of ContentsCom...read more
image
Bit Magic
Competitive Programming
DSA
Unique Number I
Last Updated: 21 April 2025
Given an array of integers, every element in the array appears twice except for one element which appears only once. The task is to identify ...read more
Arrays
Bit Magic
Bitwise-XOR
DSA
Cyclic Redundancy Check and Modulo-2 Division
Last Updated: 27 April 2025
Cyclic Redundancy Check or CRC is a method of detecting accidental changes/errors in the communication channel. CRC uses Generator Polynomi...read more
image
Bit Magic
Modular Arithmetic
DSA
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Competitive Programming
2.3k+ articles
Algorithms
2k+ articles
Bitwise-XOR
430+ articles
Bitwise-AND
130+ articles
setBitCount
110+ articles
Bitwise-OR
110+ articles
C++ Bitset and its Application
Last Updated: 08 April 2025
In C++, the bitset is a container that represents a fixed-size sequence of bits. A bitset allows you to manipulate individual bits efficient ...read more
Bit Magic
STL
CPP-Library
C++
CPP-bitset
DSA
1's and 2's complement of a Binary Number
Last Updated: 20 March 2025
Given a binary number s represented as a string. The task is to return its 1's complement and 2's complement in form of an array as [onesCom ...read more
Arrays
Strings
Bit Magic
Amazon
binary-representation
complement
DSA
Bit Fields in C
Last Updated: 06 November 2024
In C, we can specify the size (in bits) of the structure and union members. The idea of bit-field is to use memory efficiently when we know ...read more
Bit Magic
C Language
DSA
Bitwise Operators in C
Last Updated: 06 May 2025
In C, bitwise operators are used to perform operations directly on the binary representations of numbers. These operators work by manipulati ...read more
Bit Magic
Bitwise-XOR
cpp-operator
C Language
C++
C-Operators
DSA
Swap Two Numbers Without Using Third Variable
Last Updated: 26 December 2024
Given two variables a and y, swap two variables without using a third variable.Examples: Input: a = 2, b = 3Output: a = 3, b = 2Input: a = 2 ...read more
Bit Magic
Mathematical
Bitwise-XOR
Swap-Program
DSA
Travelling Salesman Problem using Dynamic Programming
Last Updated: 26 November 2024
Given a2d matrix cost[][]ofsize nwherecost[i][j]denotes the cost of moving fromcity i to city j.The task is to complete atourfromcity 0 (0-b ...read more
Bit Magic
Microsoft
Google
Graph
NPHard
Opera
Dynamic Programming
DSA
Binary representation of a given number
Last Updated: 17 March 2025
Given an integer n, the task is to print the binary representation of the number.Note: The given number will be maximum of 32 bits, so appen ...read more
Bit Magic
Microsoft
DSA
Josephus Problem
Last Updated: 20 February 2025
There are N people standing in a circle waiting to be executed. The counting out begins at some point in the circle and proceeds around the ...read more
image
Bit Magic
Walmart
Mathematical
Recursion
DSA
Add two numbers without using arithmetic operators
Last Updated: 11 September 2024
Given two integers a and b, the task is to find the sum of a and b without using + or - operators. Examples:Input: a = 10, b = 30Output: 40I...read more
image
Bit Magic
Mathematical
Bitwise-XOR
DSA
Count set bits in an integer
Last Updated: 15 February 2025
Write an efficient program to count the number of 1s in the binary representation of an integer.Examples :Input : n = 6Output : 2Binary repr...read more
image
Bit Magic
setBitCount
Adobe
Qualcomm
Samsung
Cisco
Brocade
Juniper Networks
Wipro
DSA
What is Endianness? Big-Endian & Little-Endian
Last Updated: 23 May 2024
Computers operate using binary code, a language made up of 0s and 1s. This binary code forms the foundation of all computer operations, enab ...read more
Bit Magic
Little Endian
Big Endian
Endianness
DSA
Program to find whether a given number is power of 2
Last Updated: 12 March 2025
Given a positive integer n, the task is to find if it is a power of 2 or not.Examples:Input : n = 16Output : YesExplanation: 24 = 16Input : ...read more
Bit Magic
Qualcomm
Samsung
SAP Labs
FactSet
Mathematical
DSA
1 2 3 4 5 6 7 8 >>
Last
1 2 3 4 5 6 >>
Last
1 2 3 4 >>
Last
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
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
Lightbox