Why isn't MongoId 12 byte, but 24 byte?

According to the official document:

The BSON object identifier is a 12-byte value consisting of a 4-byte timestamp (seconds from an era), a 3-byte machine identifier, a 2-byte process identifier, and a 3-byte counter

But actually this is a 24 byte value like 4d7f4787ac6d604009000000

Why is this happening?

+3
source share
1 answer

This is a hexadecimal value. One hexadecimal digit = 4 bits. 24 hexadecimal digits = 96 bits = 12 bytes.

+7
source

All Articles