Nov 11, 2011 #1 H hithesh123 Full Member level 6 Joined Nov 21, 2009 Messages 324 Helped 1 Reputation 2 Reaction score 1 Trophy points 1,298 Location lax Activity points 3,548 I use the function std_logic_vector(to_unsigned(num, bits)) to convert unsigned int to std logic vector. If the unsigned int is 1000, and if I select the number of bits as 8, do I get the lower 8 bits or higher 8 bits?
I use the function std_logic_vector(to_unsigned(num, bits)) to convert unsigned int to std logic vector. If the unsigned int is 1000, and if I select the number of bits as 8, do I get the lower 8 bits or higher 8 bits?
Nov 11, 2011 #2 T TrickyDicky Advanced Member level 7 Joined Jun 7, 2010 Messages 7,110 Helped 2,081 Reputation 4,181 Reaction score 2,048 Trophy points 1,393 Activity points 39,769 lower 8 bits. So you would get 232