Prev Problem
Next Problem

58. Maximum of Two Numbers

Return the larger of two 8-bit unsigned inputs using a function.

Behavior

  • max = a if a > b
  • max = b otherwise

Requirements

  • Module: max2_func
  • Inputs: a[7:0], b[7:0]
  • Outputs: max[7:0]

Additional Notes:

  • A function max2(x,y) is provided — write the single comparison line inside it.
  • Call max2(a,b) to drive max.
  • Pure combinational RTL (no delays, no latches).
Need Help? Refer to the Quick Guide below