dd - binary file

I have a task that says: make a file (called binaryfile ) that contains
4 bytes of NULL data
6 bytes of random data
8 bytes of 1
10 bytes of 5
and 12 bytes of 9.

For the first 2, I can used :
dd if=/dev/null of=binaryfile bs=8 count =4 and
dd if=/dev/urandom of=binaryfile bs=8 count=6 seek=4, but how can I do the rest ???
I know, bs will remain 8 (8 bits) and seek will increase after each append to my file. My question is, how to tell dd what bits to copy (other than 0 or random).

No, you need to use /dev/zero. This will not output anything no matter how many bytes you ask it to. For the subsequent tasks, you output dd to a filter which will convert the 0's to whatever:

dd if=/dev/zero bs=1 count=8 | tr '\0' '\1'

ok, what you say is correct ! But for the rest ? How can I copy 1, 5 or 9 ? /dev/1 or /dev/9 doesn't exist. This I say is the tricky part..

Just like I said in the example tr code. Change \1 to \5 or \9.