A synchronous rectifier for converting an AC input having two components AC1 and AC2 into a DC output VRECT, the synchronous rectifier comprising: four switches including: a first switch (504) connected between AC1 and ground; a second switch (504) connected between AC2 and ground; a third switch (504) connected between AC1 and VRECT; and a fourth switch (504) connected between AC2 and VRECT; and four switch control modules (502...502), each configured to control a corresponding one of the four switches, wherein each switch control module comprises: digitally assisted switch-on circuitry configured to control when to turn on the corresponding switch; and digitally assisted switch-off circuitry configured to control when to turn off the corresponding switch; characterized in that the digitally assisted switch-on circuitry comprises: an on-bounce detector configured to detect an undershoot in the corresponding AC component between the AC component going negative and the relevant switch turning on; a first up/down counter configured to, for each cycle, increment a first counter value when the on-bounce detector detects an undershoot and to decrement the first counter value when the on-bounce detector does not detect an undershoot; a digital-to-analog converter, DAC, configured to convert the first counter value to an analog reference signal; and a comparator configured to compare the corresponding AC component to the analog reference signal to generate an on control signal for turning on the corresponding switch. four switches including: a first switch (504) connected between AC1 and ground; a second switch (504) connected between AC2 and ground; a third switch (504) connected between AC1 and VRECT; and a fourth switch (504) connected between AC2 and VRECT; and a first switch (504) connected between AC1 and ground; a second switch (504) connected between AC2 and ground; a third switch (504) connected between AC1 and VRECT; and a fourth switch (504) connected between AC2 and VRECT; and four switch control modules (502...502), each configured to control a corresponding one of the four switches, wherein each switch control module comprises: digitally assisted switch-on circuitry configured to control when to turn on the corresponding switch; and digitally assisted switch-off circuitry configured to control when to turn off the corresponding switch; digitally assisted switch-on circuitry configured to control when to turn on the corresponding switch; and digitally assisted switch-off circuitry configured to control when to turn off the corresponding switch; characterized in that the digitally assisted switch-on circuitry comprises: an on-bounce detector configured to detect an undershoot in the corresponding AC component between the AC component going negative and the relevant switch turning on; a first up/down counter configured to, for each cycle, increment a first counter value when the on-bounce detector detects an undershoot and to decrement the first counter value when the on-bounce detector does not detect an undershoot; a digital-to-analog converter, DAC, configured to convert the first counter value to an analog reference signal; and a comparator configured to compare the corresponding AC component to the analog reference signal to generate an on control signal for turning on the corresponding switch. an on-bounce detector configured to detect an undershoot in the corresponding AC component between the AC component going negative and the relevant switch turning on; a first up/down counter configured to, for each cycle, increment a first counter value when the on-bounce detector detects an undershoot and to decrement the first counter value when the on-bounce detector does not detect an undershoot; a digital-to-analog converter, DAC, configured to convert the first counter value to an analog reference signal; and a comparator configured to compare the corresponding AC component to the analog reference signal to generate an on control signal for turning on the corresponding switch.