finished assignment 6 for digital logic