CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Arithmetic

Fixed Point Format Alignment

MediumLogic CircuitBuild

Digital signal processors cannot directly add values with different radix points. Hardware must physically align the implicit fractional boundaries of fixed-point numbers before routing them to an arithmetic logic unit.

The circuit receives two 4-bit unsigned inputs: A in Q2.2 format and B in Q3.1 format. Align both inputs into a common 5-bit Q3.2 format. Add the aligned values and output the 5-bit sum Y.

Format definitions: * A (Q2.2): 2 integer bits, 2 fractional bits. * B (Q3.1): 3 integer bits, 1 fractional bit. * Y (Q3.2): 3 integer bits, 2 fractional bits.

Constraints

  • Combinational logic only.
  • Treat all input and output signals as unsigned values.
  • Ignore any carry-out bit from the 5-bit addition.

Topics

ArithmeticALUFixed-Point

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • Half Adder Using Only XOR and ANDEasy
  • Floating Point Exception FlagsMedium
  • 1-Bit ALU SliceMedium
  • 4-bit Carry Lookahead BlockHard
  • BCD Adder Correction BlockMedium
  • IEEE 754 Mantissa Alignment ShifterHard
  • Four-Bit Bus AdderEasy
  • Debugging Twos Complement OverflowMedium

Browse all problems · Learning tracks