Recently the concept of ideal binary time-frequency masks has received attention and their optimality in terms of signalto-noise ratio has been presumed. However the optimality is not rigorously analyzed. In this paper we treat this issue formally and clarify the conditions for ideal binary masks to be optimal. We also experimentally compare the performance of ideal binary masks in terms of signal-to-noise ratio to that of ideal ratio masks on a speech mixture database and a music database. The results show that ideal binary masks are close in performance to ideal ratio masks which are closely related to the Wiener filter, the theoretically optimal linear filter.