Lennon wrote the guitar riff while in the studio recording "Eight Days a Week".
At the time of the song's recording, the Beatles, having mastered the studio basics, had begun to explore new sources of inspiration in noises previously eliminated as mistakes (such as electronic goofs, twisted tapes, and talkback).