The volume of one cube is
(1/2 in)³ = 1/8 in³
8 such cubes will have a volume of
8*(1/8) in³ = 1 in³
The volume of the prism is 1 in³.
_____
This one is another question that goes into the "impossible geometry" file. A triangular prism cannot be constructed using cubes.