Is it possible to round a perlin noise value to 1 or 0?

Is it possible to round a perlin noise value to 1 or 0? What I mean is, if perlin noise floats between 0 and 1, how can I round the values bigger than 0.50 to 1 and the values smaller than 0.50 to 0.
I’m making a texture and I already have perlin noise generating it, but what I’m looking for is a 0 or 1 system.

Unity’s Perlin Noise function takes a Vector2 as input and returns a float value, so I don’t see any reason why you wouldn’t be able to simply Round the result of it.

float totalWidth = 50.0f; // example Width
float totalHeight = 50.0f; // example Height

for(int y = 0; y < totalHeight; y++)
{
	float fy = y / totalHeight;
	for(int x = 0; x < totalWidth; x++)
	{
		float fx = x / totalWidth;
		float sample = Mathf.PerlinNoise(fx, fy);
		sample = Mathf.Round(sample);
	}
}