Byte a=byte.Parse(this.TextBox1.Text); this.TextBox2.Text=Convert.ToString(a,2);//第一个参数是字节类型,第二个参数是转换成二进制