The firmware handles the translation. Download Marlin, look in configuration.h, you can tell it which set of electronics you have. If you have custom electronics, you can alter pins.h to define the pins for those electronics.
G-code is higher level, it deals with moving the machine in milimeters rather than flipping pins and counting steps.
G-code is higher level, it deals with moving the machine in milimeters rather than flipping pins and counting steps.