GithubHelp home page GithubHelp logo

Comments (1)

nullfx avatar nullfx commented on August 15, 2024

the CRC of an array of bytes is a number (not a string). this may be confusing to some people not familiar with number systems other than base 10. The hexidecimal (base 16) number 0x3AD00FD2 is 986714066 in decimal (base 10). furthermore 3AD00FD2 and 3ad00fd2 are the same number because numbers unlike letters do not have "capitals or lowercase versions of themselves (technically). With base 16 letters from the alphabet are used to represent values 10 through 16 (a-f/A-F) but whether you use the capital or lowercase A/a is always the value for 10, B/b is always the value for 11 and so on... https://en.wikipedia.org/wiki/Radix

to get the upper / lower case hexidecimal representation of the number in .net you use the standard .net format string for hex (scroll towards the bottom search for "x").

to view this / use this, simply create a console application and use the following code. using the "x" format will return a-f in lower case. "X" will return A-F in uppercase.

var crc = 0x3AD00FD2;
var lowerCased = $"{crc:x8}";
var upperCased = $"{crc:X8}";
Console.WriteLine(lowerCased);
Console.WriteLine(upperCased);

regardless they're the same number. ;)

cheers.
--Steve

from nullfx.crc.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.