library/src/utility/BP-StringUtilities.cc
// attempt to print bits in a byte
attempt to print bits in a byte
attempt to print bits in a byte
BP_ERROR_T BP_PrintBitsInByte(unsigned char in_byte)
{
	BP_CHECK_BIT_IS_SET(in_byte, 7) ? printf("1") : printf("0");
	BP_CHECK_BIT_IS_SET(in_byte, 6) ? printf("1") : printf("0");
	BP_CHECK_BIT_IS_SET(in_byte, 5) ? printf("1") : printf("0");
	BP_CHECK_BIT_IS_SET(in_byte, 4) ? printf("1") : printf("0");
	BP_CHECK_BIT_IS_SET(in_byte, 3) ? printf("1") : printf("0");
	BP_CHECK_BIT_IS_SET(in_byte, 2) ? printf("1") : printf("0");
	BP_CHECK_BIT_IS_SET(in_byte, 1) ? printf("1") : printf("0");
	BP_CHECK_BIT_IS_SET(in_byte, 0) ? printf("1") : printf("0");
	return ERR_SUCCESS;
}
BP_ERROR_T BP_PrintBitsInByte ( unsigned char in_byte ) { BP_CHECK_BIT_IS_SET ( in_byte , 7 ) ? printf ( " " ) : printf ( " " ) ; BP_CHECK_BIT_IS_SET ( in_byte , 6 ) ? printf ( " " ) : printf ( " " ) ; BP_CHECK_BIT_IS_SET ( in_byte , 5 ) ? printf ( " " ) : printf ( " " ) ; BP_CHECK_BIT_IS_SET ( in_byte , 4 ) ? printf ( " " ) : printf ( " " ) ; BP_CHECK_BIT_IS_SET ( in_byte , 3 ) ? printf ( " " ) : printf ( " " ) ; BP_CHECK_BIT_IS_SET ( in_byte , 2 ) ? printf ( " " ) : printf ( " " ) ; BP_CHECK_BIT_IS_SET ( in_byte , 1 ) ? printf ( " " ) : printf ( " " ) ; BP_CHECK_BIT_IS_SET ( in_byte , 0 ) ? printf ( " " ) : printf ( " " ) ; return ERR_SUCCESS ; }
attempt to print bits in a byte
attempt to print bits in a byte
// display bits // return indicating success