digitalWrite() can it take 0 or 1 instead of HIGH?

Yes, LOW is defined as 0, HIGH as 1 so either the values or constants can be used