In the diff output, 5d4 tells you that a deletion is needed to make the first file match the second file.
Here is the breakdown of 5d4:
5: Refers to Line 5 in the first file.d: Stands for Delete.4: Indicates that after deleting line 5 from the first file, the files would sync up at Line 4 of the second file.
In simple terms:
It means: "Delete line 5 from the first file so that both files match up to line 4."
Example of what the output would look like:
5d4
< This is the line that exists in file1 but not in file2
The < symbol shows you exactly which line is present in the first file but missing (deleted) in the second one.