Data entry of an int value through Arduino IDE terminal

Decide on a terminating character. Read data from the Serial buffer into an array until the terminating character, appending a null termintor along the way. Once you have the full string, use sscanf() to turn the hex string into binary.