InterviewLegend

Bit Manipulation in C: Set Bits, Masks & Endianness

Alex Chen40 min readGuide updated 61 real interview reports

AMD asks about bits more than about anything else in its coding rounds. There are 20 reports from 2012 to June 2026, 15 of them firsthand, and they come from firmware and embedded teams and from general software loops alike. You write the answer in C or C++, usually live, and sometimes somewhere with no compiler at all.

The newest rounds confirm the topic without naming the operation. A September 2026 Markham driver round put a bitwise task among its three C tasks, and the transformation wasn't shared. A June 2026 Austin firmware loop called its questions easy, bit manipulation and arrays among them. In January 2026 two firmware interviewers had a candidate type C++ bit code into Notepad over screen share, after the recruiter had said there would be no live coding. A November 2025 Markham video intern round had one bit-manipulation LeetCode problem.

So the named problems below carry their own dates, all from 2025 or earlier. The first four all appear in 2025 rounds, and three of them go back years before that. Reversing bits and swapping without a temporary last showed up in 2021 and 2022, and they sit in their own section at the end.

The AMD angle
Write it in C, keep it unsigned, and be ready to go one level down. Two 2024 rounds asked for the same answer again in assembly, a set-bit count and a decimal-to-binary conversion. A plain loop you can translate line by line beats a builtin you can't explain.

AMDPremium lesson · Coding round

The 6 AMD problems are below.

  1. A Premium questionCoding · Easy · Frequently asked
  2. A Premium questionCoding · Easy · Frequently asked
  3. A Premium questionCoding · Easy · Frequently asked

+ 3 more in this lesson

Each with hints, the follow-up and a tested solution.

Get the AMD questions

$49 a year · all 122 companies · instant access

21,000+ candidate reports

AMD interview guide

Know what AMD asks before you walk in.

37 coding · 5 system design · 17 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your AMD interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.