You don't actually need to know the entire Highway Code ... unless, of course, you want to. You will need to know the answers to a selection of questions which will be taken from the Highway Code. If you buy a DVLA theory test study guide for the year in which you'll be taking the test (or the most recently published guide), you'll be covered. The questions change every year, so be careful you don't buy an older study guide as it may not include the information you'll need.