To view in decimal:comp File1 File2 /D /m
(similar to gc -encoding byte File1
in powershell)
To view in hex:fc /b File1 File2
(similar to gc -encoding byte File1 |% {write-host ("{0:X2}" -f $_)}
in powershell)
NB:
File2 is a reference file with no similar characters to File1
If unsure, then a workaround would be to fill File2 with 0x20, then for 2nd comparison fill File2 with 0x00 and replace the missing characters with 0x20 (in the 1st comparison)
(Or just fill the missing offsets with 0x20 in lieu of 2nd comparison)
Update: 15 Oct 2021
powershell 5.1 format-hex
seems to have a bug decoding binary files.A sample test had error displaying offsets 0x290 & 0x7c0 for a 2kB file.
Sample output:
00000280 5B E3 6D 67 2E D9 03 AB 0A DF D7 73 7A 3F 61 9B [ãmg.Ù.«.ß×sz?aE 4C FB 38 46 91 C7 13 42 92 C7 8A B4 DF E8 6A ÞLû8FÇ.BÇ´ßèj000002A0 00 0C 3D 68 50 9D D4 9C 1C 92 DB F0 B5 79 5F 4A ..=hPÔ.Ûðµy_J...000007B0 5C F1 20 1F D8 8E EA 9B 03 91 EF 20 87 A4 4D 9B \ñ .Øêï¤M0 A5 54 30 1D CC 4F 56 31 C5 39 15 2E 3A A8 8D BC ¥T0.ÌOV1Å9..:¨¼000007D0 B1 BA 8D 30 58 F5 DE 4F DD 8C 4B 34 22 D5 27 6A ±º0XõÞOÝK4"Õ'j
certutil
works well.
Tested on Win 10 x64