Webacus (logo)
Watch Video

HEX.string / to-DATE

Decode hex string into integer timestamp and convert it to datetime

Hexadecimal decoding (hex decoder)

To convert a hexadecimal string into its binary form, each hex character is first translated to its corresponding binary representation. Hexadecimal (or "hex") is a base-16 numbering system, meaning it uses 16 symbols: 0-9 for values zero through nine, and A-F (or a-f in lowercase) for values ten through fifteen. Since each hex digit represents exactly four binary bits, this conversion is straightforward.

This approach is particularly useful for developers and digital forensics experts who need to examine or manipulate data at a low level, as it allows them to interpret binary and hex data interchangeably.

Notes:

  • decoder will ignore any spaces , colons :, escape sequences \x
  • 0x at the start of the string will be removed
  • one 0 will be added to the start of the string when string is not of even length

Sample:

77:65:62:61:63:75:73
----- = -----
webacus

In mathematics and computer science, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a–f) to represent values ten to fifteen. For example, the hexadecimal number 2AF3 is equal, in decimal, to (2 × 163) + (10 × 162) + (15 × 161) + (3 × 160) , or 10995. Each hexadecimal digit represents four binary digits (bits) (also called a "nibble"), and the primary use of hexadecimal notation is as a human-friendly representation of binary coded values in computing and digital electronics. For example, byte values can range from 0 to 255 (decimal) but may be more conveniently represented as two hexadecimal digits in the range 00 through FF. Hexadecimal is also commonly used to represent computer memory addresses.[1]

Sources:
[1] en.wikipedia.org/wiki/Hexadecimal

Convert bytes to integers

Command takes 6 bytes (BigInt is not yet supported) and converts them into integer. Conversion supports 3 different formats:

  • natural
  • ones' complement
  • twos' complement
,

Natural

In mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: typically "0" (zero) and "1" (one). The base-2 numeral system is a positional notation with a radix of 2.[1]

Ones' complement

The ones' complement of a binary number is defined as the value obtained by inverting all the bits in the binary representation of the number (swapping 0s and 1s). The ones' complement of the number then behaves like the negative of the original number in some arithmetic operations. To within a constant (of −1), the ones' complement behaves like the negative of the original number with binary addition. However, unlike two's complement, these numbers have not seen widespread use because of issues such as the offset of −1, that negating zero results in a distinct negative zero bit pattern, less simplicity with arithmetic borrowing.[2]

Twos' complement

Two's complement is a mathematical operation on binary numbers, and is an example of a radix complement. It is used in computing as a method of signed number representation.

The two's complement of an N-bit number is defined as its complement with respect to 2N; the sum of a number and its two's complement is 2N. For instance, for the three-bit number 010, the two's complement is 110, because 010 + 110 = 8 which is equal to 23. The two's complement is calculated by inverting the digits and adding one.[3]

Sources:
[1] en.wikipedia.org/wiki/Binary_number
[2] en.wikipedia.org/wiki/Ones'_complement
[3] en.wikipedia.org/wiki/Two'_complement

Timestamp (unix)

The unix time stamp is a way to track time as a running total of seconds. This count starts at the Unix Epoch on January 1st, 1970 at UTC. Therefore, the unix time stamp is merely the number of seconds between a particular date and the Unix Epoch. It should also be pointed out (thanks to the comments from visitors to this site) that this point in time technically does not change no matter where you are located on the globe. This is very useful to computer systems for tracking and sorting dated information in dynamic and distributed applications both online and client side.[1]

Timestamp from date

Given a date (date or text value) it will convert it into Unix timestamp. Calculated timestamp represent seconds from epoch.

Timestamp to date

Given a number (number or text value) it will convert it into date value. Number represents seconds from epoch.

Source:
[1] www.unixtimestamp.com/